VALUE1
-
VALUE2

The - operator subtracts the numeric value on the right from the numeric value on the left.

Parameters

This operator has two parameters:

value1 – The first numeric value.

value2 – The second numeric value.

Description

This operator performs subtraction just like you learned in grade school. You can subtract integers:

``````5-2 ☞ 3
``````

And you can also subtract floating point values:

``````5.75-2.5 ☞ 3.25
``````

Error Messages

Cannot subtract a number from text (or text from a number) – Both operands must be numbers. If either or both operands are text values you must use the val( function to convert the value to a number before subtracting.

• * -- 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.
• + -- 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.
• 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.
• validnumber( -- checks to see if a numeric value is valid.

History

 Version Status Notes 10.0 No Change Carried over from Panorama 6.0