Today, I'd like to write about condition in Small Basic. I hope this information make you understand Small Basic deeply.
In Small Basic, there are two pattern to use conditon as follows.
If condition Then
There are following three types of condition in Small Basic.
There are follwing six comparison operators in Small Basic.
Equal to and not equal to are used for text also. But other operators are for numbers. If you compare two texts with operators including less or greater, the texts are converted to number zeroes before comparison. So you can't compare such like "ant" > "apple". To compare order for texts, you should create a subroutine.
There are following two logical operators in Small Basic.
Small Basic doesn't have Not operator. Following code is my alternate solution.
Not = "True=False;False=True;"
There are following two logical values in Small Basic.
These texts are not case-sensitive. So you can write "TRUE" or "false" for the same purpose. Actually, Small Basic checks whether the logical value is "True" or not.