Color BASIC - Operators and Symbols

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:

    As usual I finish the day before the sea, sumptuous this evening beneath the moon, which writes Arab symbols with phosphorescent streaks on the slow swells. There is no end to the sky and the waters. How well they accompany sadness!
    Albert Camus (1913–1960)