User guide
eWON 500-2001-4001-4002 User Guide - Programming the eWON
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 129
9.1.10.5 Real arrays
When the DIM command is called, the array is created and replaces any existing array with the same name.
To erase an array you can either use the CLEAR command that erases all variables, or bring back the dimension of the array to 1 element if you
don’t want to clear everything but need to release memory.
In order to assign a value, type a(x, y, z)=value.
An array of which name is a(E1,E2,E3) and a real variable of which name is a CAN exist simultaneously. A real array contains E1*E2*E3 *...
reals.
Syntax [Command]
DIM a(E1 [, E2 [, E3 [,....]]])
a is the name of the array variable created, its name contains one character from "a" to "z". E1 is the number of real for the first dimension. E2,
E3, E4 are optional and are present if the array must have 2, 3, 4,… dimensions.
The number of dimensions is only limited by the BASIC memory size.
Example:
9.1.11 TagName variable
Syntax
TagName@
TagName is the name of the Tag. This syntax allows direct access to the Tag value. This syntax can be used for reading or writing to the Tag.
This syntax should replace in many cases the GETIO SETIO commands. Only in some cases it is useful to use the GETIO or SETIO commands
in order to build the Tag name in the program (If a Tag name begins with a number, it cannot be accessed in Basic using the @ syntax, instead
the GETIO, SETIO function must be used).
Example: Tag1, Tag2, Tag3…
Repetitive operations can be performed with "Tag"+STR$(I%) for example.
9.1.12 Limitations of the BASIC
• Names of integer and string variables are one character long.
• The maximum number of integer variables is 26 (names are ‘a%’ to ‘z%’).
• The maximum number of string variables is 26 (names are ‘a$’ to ‘z$’).
• This limitation is not applicable to real variable because real names are 200 characters long (maximum).
If more strings are required Arrays of any dimensions can be allocated.
• The eWON BASIC script is limited by the memory reserved for it (128 k).
Users have to share this memory space between the code and the data.
DIM d(5,5)
d(1,6)=6