Get variable

Returns the value which is currently stored in the variable of the selected name.

Options: The dropdown list shows you all the variables which were defined by the block set variable.


Set variable

Assigns a value to a variable. In case a value was already assigned to this variable, this value will be overwritten.

Options:

  • You can select one of the names available in the dropdown (e.g. value). These are the names of the variables previously defined.
  • Rename variable: With this option you can specify a new name for this variable. All variables with this name in the program will then be renamed.
  • New variable: With this option you can enter a new name for the variable, without impacting any other variables in the program.


Set variable to a specific type

Converts a value to specific type and stores the result in a variable.


Convert value to a specific type

Converts a given value (or variable) to a specific data type.

Options:

  • Character
  • Text
  • Boolean
  • Short number
  • Number
  • Large number
  • Decimal

This example shows a simple use of the variable. The text Hello Kniwwelino! is first stored in the variable named value. In the next line then, the content of this variable is written on the matrix.

You can find another example of how to use the variable in the sample project Rock-Paper-Scissors.

  • en/programmingblocks/variables.txt
  • Last modified: 2018/05/04 15:17
  • by kniwwelino