Number.SignNumber.Sign

SintaxeSyntax

Number.Sign(number as nullable number) as nullable number 

SobreAbout

Retornará 1 se number for um número positivo,-1 se for um número negativo e 0 se for zero.Returns 1 for if number is a positive number, -1 if it is a negative number, and 0 if it is zero. Se number for nulo, Number.Sign retornará nulo.If number is null, Number.Sign returns null.

Exemplo 1Example 1

Determina o sinal de 182.Determine the sign of 182.

Number.Sign(182)

1

Exemplo 2Example 2

Determina o sinal de -182.Determine the sign of -182.

Number.Sign(-182)

-1

Exemplo 3Example 3

Determina o sinal de 0.Determine the sign of 0.

Number.Sign(0)

0