Operators and Symbols
Color BASIC provides several operators for both mathematic and, to a lesser extent, string operations.
+ can be used to concatenate strings or for mathematical addition
- is used for subtraction
* is used for multiplication
/ is used for division
Parenthesis ( ) are used to override mathematical order of operation
AND is used for logical 'and' operations
OR is used for logical 'or' operations
NOT is used for logical 'not' operations
For testing, the following operators are used:
= is equal to
> is greater than
< is less than
>= is greater than or equal to (also => is acceptable)
<= is less than or equal to (also =< is acceptable)
<> is not equal to (also >< is acceptable)
Other symbols used in BASIC:
" " indicates string data is a constant (static)
: separates multiple commands on a single program line
A semicolon, when encountered in a PRINT function, will cause the output to remain on the same line
A comma, when encountered in a PRINT function, will tab to the next column
Read more about this topic: Color BASIC
Famous quotes containing the word symbols:
“Many older wealthy families have learned to instill a sense of public service in their offspring. But newly affluent middle-class parents have not acquired this skill. We are using our children as symbols of leisure-class standing without building in safeguards against an overweening sense of entitlementa sense of entitlement that may incline some young people more toward the good life than toward the hard work that, for most of us, makes the good life possible.”
—David Elkind (20th century)