4gl operators

Here are the 4gl operators supported by Lycia:

Arithmetic operators

Unary arithmetic operators: +a (unary plus) and -a (unary minus)

Binary arithmetic operators: + (addition), - (subtraction), * (multiplication), / (division), ** (exponentiation), and MOD (modulus)

Assignment operators: := (assignment), += (addition assignment), -= (subtraction assignment), *= (multiplication assignment), /= (division assignment), ||= (concatenation assignment), ,= (append assignment).

Boolean operators: AND, OR, and NOT

Relational operators: = and == (equal to), <> and != (not equal to), < (less than), > (more than), <= (less than or equal to), and >= (more than or equal to)

Bitwise operators: & (and), | (or), ^ (xor), and ~ (nor)

Date and time operators: CURRENT, DATE, DAY, EXTEND, MDY, MONTH, TIME, TODAY, UNITS, WEEKDAY, and YEAR

String operators: ASCII, CLIPPED, || (concatenation), LIKE, MATCHES, SFMT, [ ] (sub-string), and USING

Field operators: FIELD_TOUCHED, GET_FLDBUF, and INFIELD

Print operators: COLUMN, LINENO, PAGENO, SPACE, and WORDWRAP

Operators vs functions

In 4GL, operators differ from functions in these ways:

In other ways, they are similar to 4gl functions in terms of syntax and behavior. Operators that return a single value can be operands in expressions.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.