- (subtract) (AutoLISP)

Subtracts the second and following numbers from the first and returns the difference

Supported Platforms: Windows and Mac OS

Signature

(- [number number ...])
number

Type: Integer or Real

A numeric value.

Return Values

Type: Integer or Real

The result of the subtraction. If you supply more than two number arguments, this function returns the result of subtracting the sum of the second through the last numbers from the first number. If you supply only one number argument, this function subtracts the number from zero, and returns a negative number. Supplying no arguments returns 0.

Examples

(- 50 40)
10

(- 50 40.0)
10.0

(- 50 40.0 2.5)
7.5

(- 8)
-8