User variables

Besides the TML pre-defined variables, you can also define your own user variables. You can use your variables in any TML instruction accepting variables of the same type.

The user variables type can be: integer, fixed (point) or long (integer) (see table below).

TMLDataTypes

The address of the user variables is automatically set in the order of declaration starting with 0x03B0. First integer variable takes address 0x3B0, next one 0x3B1, etc. An int variable takes one memory location. A long or fixed variable takes 2 consecutive memory locations. In this case the variable address is the lowest one.

Example:

       int user_var1;                // user_var1 address is 0x3B0

       long user_var2;        // user_var2 address is 0x3B1

       fixed user_var3;        // user_var3 address is 0c3B3

       int user_var4;                // user_var4 address is 0x3B5

Remark: you have to declare a user variable before using it first time.

 

See also:

TML Data

TML Registers

TML Parameters

TML Variables