Querix 4GL can use any of these entities as operands in 4gl expressions:
A named value is a variable of any simple data type, an element of an array, a member of a record or the constants TRUE, FALSE, NOTFOUND:
Array |
The name of a variable of either ARRAY or DYNAMIC ARRAY data type |
Record |
The name of a variable of the RECORD data type |
Variable |
The name of a variable of simple data type |
Constant |
One of the built-in constants: TRUE, FALSE or NOTFOUND |
Index |
comma-separated list of up to 3 integer expressions specifying the index of an array element |
An identifier of a variable of TEXT or BYTE data type can be used as an operand in a 4gl expression only together with IS NULL, IS NOT NULL and WORDWRAP operators.
Calls for functions that return a single value can be used as operands of 4g expressions.
Function(arg_list) |
The name of a function |
Argument list |
Optional list of arguments passed to the function. If it is empty, the parentheses must still be present |
It can be a built-in function or a programmer-defined function, provided that it returns only one value of the data type that is valid in the 4gl expression in which the function operand is used.
Literal values can be used as operands. A literal value can be either a number or it can be a character string. Character strings used as operands must be enclosed in double quotation marks ("…"). Digits must be enclosed in quotation marks only if they represent DATETIME, DATE, INTERVAL values in the form of a character string, in other cases the usage of the quotation marks is optional.
Two or more expressions can occur as operands within one expression only if they are used with separators. You cannot use too complex nested expressions; if an expression is too complex, an error will appear. You should substitute one complex expression by two or more simple expressions. When an expression returns a different data type from which is expected, Querix4gl will try to convert this value to the required data type.