Rebol 编程/sign?
外观
< Rebol 编程
SIGN? number
返回数字的符号,为 1、0 或 -1(用作乘数)。
SIGN? 是一个函数值。
- number -- (类型:数字 金钱 时间)
sign?: func [ {Returns sign of number as 1, 0, or -1 (to use as multiplier).} number [number! money! time!] ][ either positive? number [1] [either negative? number [-1] [0]] ]