BITSET


BITSET sets the value of a specified bit in the bit table to 1 and returns the value of the bit before it was changed.

 

COMMAND SYNTAX

BITSET(table_no)

 

SYNTAX ELEMENTS

table_no specifies the bit to be SET. If table_no evaluates to zero, all elements in the table are set to 1 (one) and the returned value is one.

 

NOTES

A unique table of 128 bits (numbered 1 to 128) is maintained for each process. Each bit in the table is treated as a two-state flag - the value returned will always be 0 (zero) or 1.

BITSET returns the value of the bit before it was changed - checking and setting a flag can be accomplished in one step.

BITSET also provides some special functions if you use one of the following table_no values:

-1 sets the BREAK key Inhibit bit.
-2 sets the Command Level Restart feature.
-3 sets the Break/End Restart feature.

See also BITRESET.

 

EXAMPLE

OLD.VALUE = BITSET(112)
PRINT OLD.VALUE

If table entry 112 is 0, returns a value of 0, sets bit 112 to 1, and prints 0. If table entry 112 is 1, returns a value of 1, and prints 1.


jBC