Click here to return to the KiXtart HelpDesk main page...

Dynamic Program Variables

KiXtart supports dynamic program variables and includes a full-featured expression evaluator. These features allow you to create program variables, assign values to them, and use them in complex expressions anywhere an expression is expected (just as in any programming language). For example, you can use program variables in an IF or an AT statement.

Creation of variables is automatic, which means that whenever an assignment is made to an unknown variable (either through the use of an assignment or through the GET or GETS commands), KiXtart automatically creates the variable.

There are two types of variables: string and integer. String variables can contain up to 32,000 characters. Integer variables can contain any value between -2,147,483,648 and 2,147,483,647. The type of a variable is automatically changed to the result of the expression that is assigned to it. This means that if you assign a string to an integer, the integer is changed to a string.

There is no limit on the number of variables that can be defined, other than the amount of memory available to KiXtart.

Optionally, you can create variables by specifying them at the command prompt when you start KiXtart. To do this, type the variable name followed by an equal sign (=) and the value you want the variable to have. For example:

KIX32 Demo.kix $Key=Value

Note

Do not include spaces between the equal sign (=) and the value. If you want to specify a value that contains spaces, enclose it in quotation marks (for example, KIX32 Demo.kix $Key="Hi there").