BASIC Operators

The following BASIC operators are presented:

! Logical Operator

Indicates an or operation in a logical expression.

# Relational Operator

Signifies not equal to.

& Logical Operator

Indicates that both components of a logical expression must be true.

* Arithmetic Operator

A mathematical operator indicating a multiply operation.

*= Assignment Operator

Multiplies a numeric expression and assigns it to the variable.

+ Arithmetic Operator

Performs addition or indicates a positive numeric value.

+= Assignment Operator

Adds a given numeric expression and assigns it to the given variable.

- Arithmetic Operator

Designates a subtraction operation, or to indicate a negative numeric value.

\ Arithmetic Operator

Calculates the remainder of dividing the dividend by the divisor (otherwise known as the modulo).

\= Assignment Operator

Divides a variable by a given numeric expression and assigns the remainder (modulo) to the variable.

^ Arithmetic Operator

An alternate means of indicating an exponentiation operation on a specific numeric expression.

-= Assignment Operator

Decrements a variable by a numeric expression.

/ Arithmetic Operator

Performs division.

/= Assignment Operator

Divides a variable by a numeric expression and assigns it to the given variable.

: Relational Operator

Concatenates strings in an assignment statement or, when the : displays at the end of a print or crt expression, suppresses the automatic CR/LF combination, thus holding the current print/display position.

:= Assignment Operator

Concatenates a string to a variable and assigns it back to the given variable.

<= Relational Operator

Less than or equal to operator.

<> Relational Operator

Represents a not equal to operator.

= Assignment Operator

Represents either the assignment operator in an assignment statement or a relational operator in a conditional expression.

> Relational Operator

The greater than operator.

>< Relational Operator

The not equal operator.

>= Relational Operator

The greater than or equal to operator.

and Logical Operator

Indicates that both components of a logical expression must be true.

cat Relational Operator

Concatenates strings in an expression.

eq Assignment Operator

Represents either the assignment operator in an assignment statement or a relational operator in a conditional expression.

ge Relational Operator

Denotes a greater than or equal condition between two elements.

gt Relational Operator

Denotes a greater than condition between two elements.

le Relational Operator

Represents the less than or equal to (<=) condition.

lt Relational Operator

Used in conditional expressions as an alternate form of the less than (<) condition.

match Relational Operator

Tests a string and determines if it matches a predefined pattern of alphabetical, numeric, wildcard, or literal characters.

ne Relational Operator

Represents a not equal to condition within relational expressions.

or Logical Operator

Indicates that only one of the components of a logical expression need be true for the expression to evaluate as true.