Top > Lycia reference > Querix 4GL > Operators
To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
4GL operators differ from 4GL functions in several ways:
With the exception of GET_FLDBUF( ), the CALL statement cannot invoke operators
Some operators are able to take non-alphanumeric symbols as operands
Operators cannot be referenced from C programs
Although they are different, we have chosen to describe 4GL operators in this volume. This is because they are similar to 4GL functions in terms of syntax and behavior. Operators that return a single value can be operands in expressions.
The FUNCTION statement can define (and CALL can invoke) a 4GL function that has the same name as a 4GL operator that can be defined by a FUNCTION statement, or invoked by a CALL function. In such cases, only the operator, not the function, is visible as an operand within a 4GL expression. For example:
MAIN
DEFINE my_date DATE
DISPLAY "*** MDY() Example ***" AT 1,5
DISPLAY "LET my_date = MDY(06/3,3+9,2005)" AT 3,5
LET my_date = MDY(06/3,3+9,2005)
DISPLAY my_date at 5,5
CALL fgl_winmessage("Exit","Press any key to close this demo application","info")
END MAIN
The keyword-based operators of 4GL listed below are all described in this volume. These operators, as well as other arithmetic and relational operators, are included here so that syntax articles can be found without the need to classify a given feature as a function or an operator.
AND |
LINENO |
ASCII int-expr |
MATCHES expr |
BETWEEN expr AND expr |
int-expr MOD int-expr |
char-expr CLIPPED |
NOT |
COLUMN int-expr |
OR |
CURRENT(qualifier) |
PAGENO |
DATE (date-expression) |
int-expr SPACE |
DAY (date-expression) |
int-expr SPACES |
EXTEND (value, qualifier) |
TIME |
FIELD_TOUCHED(field-list) |
TODAY |
GET_FLDBUF(field-list) |
int-expr UNITS time-keyword |
INFIELD(field) |
expression USING format-string |
IS NULL |
WEEKDAY (date-expression) |
LENGTH(char-expression) |
char-expr WORDWRAP |
LIKE |
YEAR (date-expression) |
The following table lists the arithmetic and relational operators of 4GL.
Arithmetic Operators |
Relational Operators |
||
Symbol |
Description |
Symbol |
Description |
+ |
Addition |
< |
Less than |
/ |
Division |
<= |
Less than or equal to |
** |
Exponentiation |
= or == |
Equal to |
MOD |
Modulus |
!= or <> |
Not equal to |
* |
Multiplication |
>= |
Greater than or equal to |
- |
Subtraction |
> |
Greater than |
- |
Unary negative |
|
|
+ |
Unary positive |
|
|