An operator is a symbol, set of symbols, or keyword that performs an operation on data. dBL provides many types of operators, used throughout the language, in the following categories:

Operator category

Operator symbols

Assignment

= := += -= *= /= %=

Comparison

= == <> # > < >= <= $

String concatenation

+ -

Numeric

+ - * / %
^ ** ++ --

Logical

AND OR NOT

Object

. [] NEW ::

Call, Indirection

( )

Alias

->

Macro

&

All operators require either one or two arguments, called operands. Those that require a single operand are called unary operators; those requiring two operands are called binary operators. For example, the logical NOT operator is a unary operator:

not endOfSet

The (*) is the binary operator for multiplication, for example,

59 * 436

If you see a symbol in dBL code, it’s probably an operator, but not all symbols are operators. For example, quote marks are used to denote literal strings, but are not operators, since they do not act upon data—they are part of the representation of a data type.

Another common symbol is the end-of-line comment symbol, a double slash. It and everything on the line after it are ignored by dBASE Plus. For example,

calcAverages( ) // Call the function named calcAverages

All operators and symbols are described in full in the Operators and Symbols section of this Help file.