Previous Page | Next Page

Functions and CALL Routines

SIGN Function



Returns the sign of a value.
Category: Mathematical

Syntax
Arguments
Details
Examples

Syntax

SIGN(argument)

Arguments

argument

specifies a numeric constant, variable, or expression.


Details

The SIGN function returns the following values:

-1

if argument < 0

0

if argument = 0

1

if argument > 0.


Examples

SAS Statements Results
x=sign(-5);
-1
x=sign(5);
1
x=sign(0);
0

Previous Page | Next Page | Top of Page