Dynamic Loop
In this chapter we are going to create the Dynamic Loop sample
Introduction
We can create this program quickly using the Quick Start component

Program Steps
After selecting the (Dynamic Loop) template, we will get the next steps in the Goal Designer

Creating the Program
To create this program we will use the next components
Print Text
Get Input
Assignment
For Loop
Note
This example uses the Assignment component to convert Strings to Numbers, but we can just let the Get Input component do the conversion for us.
In the begining the Steps Tree is empty

Select the (Print Text) component

Enter the data in the Interaction Page
Text: Start :
Type: Literal

The Steps Tree will be updated

Select the (Get Input) component

The variable name will be (nStart)

The Steps Tree will be updated

Print (End : )



Use the (Get Input) component

The variable name will be (nEnd)

The Steps Tree will be updated

Print (Step : )



Use the (Get Input) component

The variable name will be (nStep)


Convert the variables (nStart, nEnd and nStep) from String to Number
Use the (Assignment) component

Convert the variable (nStart) from String to Number


Use the (Assignment) component

Convert the variable (nEnd) from String to Number


Use the (Assignment) component

Convert the variable (nStep) from String to Number


Select the (For Loop) component

Enter the data in the Interaction Page
Start: x = nStart End: nEnd Step: nStep


Use the (Print Text) component to print the number


Now we have the final Steps Tree in our program
