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?

BITRESET

Description

BITRESET resets the value of a specified bit in the local bit table to zero and returns the previous value of the bit. It takes the general form: 

BITRESET(table_no)


Where:

table_no specifies the position in the table of the bit for reset. If table_no evaluates to zero, it resets all elements in the table to zero and returns the value zero.

For each process, BITRESET 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.

BITRESET returns the previous value of the bit – you can reset and check a flag in one step. BITRESET also provides some special functions if you use one of the following table_no values:

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

An example of use is as: 

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


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


See also: BITSET.

Go back to jBASE BASIC.

Was this article helpful?