SIGNUM Function

SIGNUM(a)

Returns -1 if a is negative, +1 if a is positive, and 0 if a is zero.

Parameters

a (REAL or DINT)

The input value.

Return Value

The same data type as a.

Examples

SIGNUM(0.001) returns 1.0

SIGNUM(0.0) returns 0.0

SIGNUM(-100) returns -1

 

See Also

Standard Functions


Send comments on this topic.

Copyright © 2025 Delta Computer Systems, Inc. dba Delta Motion