Language basics / Constants |
A constant defines a read-only value identified by a name. A constant is similar to a variable, except that its value cannot be modified by program code.
CONSTANT PI DECIMAL(12,10) = 3.1415926, MAX_SIZE INT = 10000, ERRMSG = "PROGRAM ERROR: %1" -- type defaults to STRING
A good practice is to define constants that belong to the same domain in a single .4gl module, define the constant as PUBLIC, and import the module where the constants are needed.