|
| Expressions |
|
KiXtart supports two types of expressions: string and numeric. A string expression can consist of any combination of the following:
Numeric expressions can consist of any combination of:
Both string and numeric expressions can contain the following conditional and logical operators:
An expression can contain up to 32,000 characters. Any variables, macros, or references to environment strings within an expression are resolved before the expression is evaluated and the return value is displayed. NoteThe characters @, %, or $ are normally used to indicate macros, environment strings, or variables. If you want to use these characters in a string, use @@, %%, or $$. The following examples show the correct use of expressions in KiXtart:
$Y = "And this is how you access environment variables: %USERNAME%..." IF @Day='Sunday' AND @USERID = 'RuudV' $X = (@MONTHNO=3 AND @MDAYNO>=20) OR @MONTHNO=4 IF @WKSTA="VLEERBEER" OR @WKSTA="PALOMINE" $X = ((@YDAYNO + 7) / 7) + 1 Strings in the script are displayed on the screen in the current character size starting from the current cursor position. For information about character size, see the BIG and SMALL commands. A string can be enclosed in single or double quotation marks. To specify quotation marks in a string, either use the CHR function or enclose the entire string in the opposite type of quotation marks .that is, if you want to include single quotation marks in a string, enclose the string in double quotation marks, and vice versa. The following examples show the correct use of string expressions in KiXtart:
KiXtart determines the type of the expression from the first element of the expression. |