contents.gifprev1.gifnext1.gif

Constants

There are three possible types of nu/TPU constants: INTEGER, STRING, and KEYWORD. Constants can be used wherever variables are allowed and can only be defined within a CONSTANT statement. Note that although constants are GLOBAL in scope, any GLOBAL definition can be overridden with a LOCAL definition. The LOCAL definition will supersede (or occlude) GLOBAL variables until the LOCAL definition is released. If a built-in function has a constant return, the result is usable as a constant.

INTEGER Constant

INTEGER constants can range from -2,147,483,648 to 2,147,483,647.

STRING Constant

STRING constants can contain any valid ASCII character but must not exceed 256 characters in length. They are delimited with quotes.

KEYWORD Constant

KEYWORD constants are those words nu/TPU reserves for itself which are necessary to nu/TPU’s successful operation. You can occlude a keyword constant in a procedure but cannot release the keyword constant from memory. After the redefining procedure terminates, the original value of the keyword constant returns.

Predefined Constants

Predefined constants follow the same rules as constants. The following table shows all nu/TPU predefined constants and their initial values.

TPU$K_ALT_MODIFIED 1

TPU$K_CTRL_MODIFIED 1

TPU$K_HELP_MODIFIED 1

TPU$K_MESSAGE_FACILITY 8

TPU$K_MESSAGE_ID 2

TPU$K_MESSAGE_SEVERITY 4

TPU$K_MESSAGE_TEXT 1

TPU$K_SEARCH_CASE 1

TPU$K_SEARCH_DIACRITICAL 2

TPU$K_SHIFT_MODIFIED 1

TPU$K_UNSPECIFIED 0 (no type)

TRUE 1

FALSE 0