<< back to sysax.com Product page

2.1. Setting and updating variables

A variable is automatically created and set to an empty string when first used. The setvar command or the strprint command can be used to set or update the values stored in a variable. A variable holds both numbers and strings and can be treated as a number or string based on the context.

Exhibit 2.1. Syntax of commands for setting variables

setvar <variable>, <string or number>;

strprint <variable>, <sequence of comma separated strings, numbers, and variables>;

Exhibit 2.2. Example of commands for setting variables

setvar ~my_number, 5;

setvar ~my_string, "this is a string";

strprint ~my_value, "the value is ", 5, " bytes";