sign()

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

Description:

Judge whether the parameter 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.

Parameters:

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