-
Notifications
You must be signed in to change notification settings - Fork 28
dos_sign
Dale Fugier edited this page Nov 6, 2023
·
1 revision
Returns a value indicating the sign of a number, or an expression based on the sign of a value.
(dos_sign number [expr1 expr2 expr3])
number
The number.
expr1
The first expression.
expr2
The second expression.
expr3
The third expression.
If optional expressions are not specified, then -1
if number is less than zero, 0
if number is equal to zero, or 1
if number is greater than zero, if successful.
If optional expressions are specified, then expr1
if number is less than zero, expr2
if number is equal to zero, or expr3
if number is greater than zero, if successful.
nil on error.
Command: (dos_sign -3.14)
-1
Command: (dos_sign 0.0)
0
Command: (dos_sign 3.14)
1
Command: (dos_sign 3.14 "Less Than" '(2 3) 5.67)
5.67