8.3.1   Variable Types

The concept of different types of variables allows a first (“coarse”) typification of variables (control or iconic data), whereas the actual type of the data for example, real, integer, string etc., is undefined until a concrete value is assigned to the variable. Therefore, it is possible that the data type of a new data item differs from that of the old.

In HDevelop, the type of a variable is defined in three different ways:

The order of precedence is as follows:

  1. Procedure parameter definitions
  2. Global variable declarations
  3. Usage in the code

In the latter case, the type of a variable is defined by those code lines, where the value of the variable is used and where the exact type of the new value is known before run time.

Within its scope, a variable must always be properly defined. The following type definition errors are possible: