constant MAX = 100 constant Upper = MAX - 10, Lower = 5 constant name_list = {"Fred", "George", "Larry"}The result of any expression can be assigned to a constant, even one involving function calls, but once the assignment is made, the value of the constant variable is "locked in".
Constant declaration also supports multiple assignment syntax (this may make more sense after reading that section) e.g.
constant {x, y, z} = {{},5,1.5}Constants may not be declared inside a subroutine. It may help to know that constants are really just variables which must be assigned on declaration, and for which subsequent assignment or other modification is prohibited. The actual constant values, both named and unnamed, are "pooled" so that only a single copy ever gets written out to a compiled executable file.
Several builtin constants are automatically defined, in psym.e/syminit(), such as C_CHAR, C_BYTE, C_PTR, NULL, WINDOWS, LINUX, PI, LOCK_SHARED, LOCK_EXCLUSIVE, BLACK, GREEN, BLUE, DB_OK, DB_OPEN_FAIL, DB_EXISTS_ALREADY, MB_OK, MB_OKCANCEL, IDOK, IDCANCEL, IDYES, IDNO, SEEK_OK, and many more besides.