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:

    Children became an obsessive theme in Victorian culture at the same time that they were being exploited as never before. As the horrors of life multiplied for some children, the image of childhood was increasingly exalted. Children became the last symbols of purity in a world which was seen as increasingly ugly.
    C. John Sommerville (20th century)