Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
statements
EndIf
While condition
statements
EndWhile
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;"
While Not[keydown]
Program.Delay(200)
EndWhile
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.
Anonymous
June 02, 2014
I like the Not Array variable to reverse logical true and false. I usually end up doing If (keydown = "False"), but I prefer your approach.
Anonymous
June 02, 2014
This is a great description! Thanks, Nonki!
Anonymous
June 02, 2014
I wrote TechNet Wiki article about control also.
social.technet.microsoft.com/.../24709.small-basic-condition.aspx
Anonymous
June 02, 2014
Oops, not control but condition.
Anonymous
December 22, 2015
great
Anonymous
March 31, 2017
very help
Please sign in to use this experience.
Sign in