VALUE1
+
VALUE2

The + operator works differently depending on the type of operands used with it. If both operands are numeric, it does numerical addition. If either operand is text the + operator concatenates (joins together) the two operands.

Parameters

This operator has two parameters:

value1 – The first numeric or text value.

value2 – The second numeric or text value.

Description

If both operands are numeric, the two operands are added together. If both are integers, the result is also an integer, in this case 4.

``````2+2 ☞ 4
``````

If either operand is floating point, the result will also be floating point.

``````2+2.5 ☞ 4.5
``````

If both operands are text they are concatenated together.

``````"one"+"two" ☞ onetwo
``````

If one operand text and the other is numeric, the numeric operand is converted to text and the two operands are then concatenated.

``````"zygon"+37 ☞ zygon37
``````

It doesn’t matter which operand is text and which is numeric.

``````25+" jump street" ☞ 25 jump street
``````

When a numeric value is converted this way, it uses the simplest possible numeric format. If you want to specify a different format use the pattern( function.

``````"Mega Widget \$"+pattern(17,"#.##") ☞ Mega Widget \$17.00
``````

Note: If the number represents a date and you want it included as text, use the datepattern( function to convert it to text.

• - -- subtracts the numeric value on the right from the numeric value on the left.
• * -- multiplies the numeric value on the left by the numeric value on the right.
• / -- divides one numeric value by another.
• \ -- performs integer division.
• ^ -- raises a number to a power.
• abs( -- calculates the absolute value of a number.
• ceil( -- converts a number to an integer, truncating toward positive infinity.
• divzero( -- divides two numbers, returns zero if denominator is zero.
• divzeroerror( -- divides two numbers, returns an error if the denominator is zero.
• fix( -- converts a number to an integer, truncating toward zero.
• fixed -- converts a floating point number to fixed point.
• float( -- converts a fixed point number to a floating point number.
• infinity( -- returns infinity.
• int( -- converts a number to an integer, truncating toward negative infinity.
• mod -- computes the remainder (modulo) after integer division.
• nan( -- checks to see if a numeric value is invalid.
• randominteger( -- generates a random integer between the starting and ending values.
• rnd( -- generates a random number between 0 and 1.
• round( -- rounds a number to a specified increment.
• sandwich( -- assembles a text item from three smaller items.
• validnumber( -- checks to see if a numeric value is valid.

History

 Version Status Notes 10.0 Updated This operator is carried over from Panorama 6.0, but now automatically converts numbers to text when the operands are mixed.