Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?



BITSET sets the value of a specified bit in the bit table to one and returns the value of the bit before it was changed. It takes the general form: 



table_no specifies the bit to be SET. If table_no evaluates to zero, it sets all elements in the table to one and the returned value is one.

For each purpose, BITSET maintains a unique table of 128 bits (numbered 1 to 128) and treats each bit in the table as a two-state flag - the value returned will always be zero or one.
BITSET returns the previous value of the bit - you can check and set a flag 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

An example of use is as: 


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

See also: BITRESET.

Go back to jBASE BASIC.

Was this article helpful?