Developer postOriginal post (opens in a new tab)

Version 0.8G

Currently, the AND, OR and XOR subroutines determine if a logical or bitwise operation is intended based on the data in the variables.

LOGICALAND, LOGICALOR AND LOGICALXOR now force the data in the variables to be evaluated as boolean (TRUE or FALSE) values.

The values 0, 0.0 and an empty string ("") are always evaluated as FALSE. Other values are TRUE.

For users wanting to use C language shortcuts, Ozapell Basic now includes && for LOGICALAND and || for LOGICALOR.

Example:

A="HELLO"
B=33
A&&B
PRINTLINE RESULT

In this example, "HELLO" is evaluated as TRUE, 33 is evaluated as TRUE and then RESULT will contain TRUE because both A and B are TRUE.

Have fun!