sign()

Read(2493) Label: judge, positive, negative, 0,

Description:

Judge whether the specified data is a positive number, a negative number or 0.

Syntax:

sign(number)

Note:

If number is a positive value, return 1; If it is a negative value, return -1; If it is 0, return 0.

Parameter:

number

Data for which you want to judge whether it is positive or negative

Return value:

Integer

Example:

sign(-10)

-1

sign(30)

1

sign(0)

0