Data types in Flowgorithm

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.

Flowgorithm allows variables to be declared using 5 types:

  1. Boolean (e.g. true, false) These are the basis of decision making in a program. Stores either true or false only.

  2. Real (e.g. 5.2, 850.0, -42.1) Can store numbers with decimals either positive or negative.

  3. Integer (e.g. 325, -42) Can store whole numbers either positive or negative. If it is used in a calculation which would normally return a decimal, it will drop off the remainder.

  4. String (e.g. “Hello World!”) Can store text data. Individual strings can be combined to create longer messages. Usually used to output instructions to the user or to add labels to other data.

  5. Arrays can be made up of any of the four basic types: Boolean, Real, Integer or String. This means that we have several spaces in memory that we can refer to using the same variable name.

Let’s Dive into Flowgorithm

Leave a Reply

Your email address will not be published. Required fields are marked *