Variable declaration

  1. In order to use variables in Flowgorithm you first “declare” them (i.e. get a space in memory for them) and then “assign” them a value.

  2. Click on the arrow between Main and End to bring up the shapes menu. Choose the yellow "Declare" shape. This will let us declare a variable. Double click the Declare shape in our flowchart to set its values.

You should see a dialog box pop up where we can set the values for the variables. You must give it a variable name and a type. Name the variable and then click the OK button.

Variable declaration

You should now see a yellow rectangle named whatever name you specified in the Declare Properties box.

Variable Assignment

  1. The steps in using a variable in Flowgorithm are to:

    1. Declare it
    2. Assign it a value
  2. To assign a value to a variable that has been previously declared, double-click on it to select it. From the shapes menu choose the Assign shape. Enter the appropriate values and click ok.

    1. You must give the name of a previously declared variable
    2. Enter the value for the variable. Note the data type must match the type originally specified for the variable (i.e. number values for integers or reals and string for alphanumeric values)
    3. See the Types section for information about the types of data that can be used with Flowgorithm.

Variable Assignment

results matching ""

    No results matching ""