Data types

Four data types are available. Note that floating numerics (reals) are supported through strings (see Add$ Subtract$ Multiply$ and Divide$ to know how to deal with floating point numbers).

Integers

Integers are 32-bit numbers (between -2 147 483 648 and +2 147 483 647).

An integer variable name can be up to 32 alphanumeric characters long. The first character must be a letter and the last one must NOT be the character $. The language is not case sensitive.

Integer variables are initialized with the value 0.

Examples :

a=12

qwerty =3567

 

Strings

A string contains up to 32,767 (32 Kb) characters.

A string variable name can be up to 32 alphanumeric characters long. The first character must be a letter and the last one MUST BE the character $. The language is not case sensitive.

(see Add$ Subtract$ Multiply$ and Divide$ to know how to deal with floating point numbers)

String variables are initialized with an empty string.

Examples :

a$="Hello"

Name$="Here is a string variable name"

 

Arrays

Arrays are unidimensional and can contain up to 65,535 elements. There are two types of arrays :

Array of integers
Array of strings

An array variable name can be up to 32 alphanumeric characters long. The first character must be a letter. The language is not case sensitive.

A name for an array of strings must end with the character $. A name for an array of integers must not end with the character $.

The array variables must be declared using the DIM function at the beginning of the script. (See Program Structure)

The first element of an array starts at 0.

Examples :

Dim Tab(10) ' Definition of an array with 11 integers (0 to 10)

Dim Tab$(20) ' Definition of an array with 21 strings (0 to 20)

Tab(1)=3

Tab$(2)= "Hello"

See also operators on arrays.

 

Unsigned

The type UNSIGNED is for unsigned 32-bit integers used for specifying a memory address (designed for API calls for example).

An UNSIGNED variable must be declared using the statement DIM at the beginning of the script. (See Program Structure)

Example :

Dim Addr as Unsigned

 

System Variables

Specific variables used by WinTask. Their name starts with the character # and their use is explained in this help system.