Addition, concatenation, unary positive operator.

Syntax

n + m

date + n

"str1" + "str2"

"str" + x

x+ "str"

+n

Description

The "plus" operator performs a variety of additive operations:

It adds two numeric values together.

You may add a number to a date (or vice-versa). The result is the day that many days in the future (or the past if the number is negative). Adding any number to a blank date always results in a blank date.

It concatenates two strings.

You may concatenate any other data type to a string (or vice versa). The other data type is converted into its display representation:

Numbers become strings with no leading spaces. Integer values eight digits or less have no decimal point or decimal portion. Integer values larger than eight digits and non-integer values have as many decimals places as indicated by SET DECIMALS.

The logical values true and false become the strings "true" and "false".

Dates (primitive dates and Date objects) are converted using DTOC( ).

Object references to arrays are converted to the word "Array".

References to objects of all other classes are converted to the word "Object".

Function pointers take on the form "Function: " followed by the function name.

Note

Adding the value null to anything (or anything to null) results in the value null.

The plus sign may also be used as a unary operator to indicate no change in sign, as opposed to the unary minus operator, which changes sign. Of course, it is generally superfluous to indicate no change in sign; the unary plus is rarely used.