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?



The NOT function is used to invert the Boolean value of an expression. It is useful for explicitly testing for a false condition. It takes the general form:


Where expression may evaluate to any Boolean result.

The NOT function will return Boolean TRUE if the expression returned a Boolean FALSE. It will return Boolean FALSE of the expression returned a Boolean TRUE. The function is useful for explicitly testing for the false condition of some test and can clarify the logic of such a test.

An example of use may be:

EQU Sunday TO NOT (MOD (DATE(), 7))
IF Sunday THEN
    CRT "It is Sunday!"

In this example, the expression MOD(DATE(),7) will return 0 (FALSE) if the day is Sunday and 1 to 6 (TRUE) for the other days. To explicitly test for the day Sunday we need to invert the result of the expression. BY using the NOT function to return a 1 (TRUE) if the day is Sunday and 0 (FALSE) for all other values of the expression.

Go back to jBASE BASIC.

Was this article helpful?