Viva Clipper !

CT_SIGN

Advertisements
 SIGN()
 Determines the mathematical sign of a number
------------------------------------------------------------------------------
 Syntax

     SIGN(<nValue>) --> nSign

 Argument

     <nValue>  Designates the number to determine as a mathematical sign.

 Returns

     SIGN() returns 1, 0, or -1, based on whether the number passed as a
     parameter is positive, null, or negative.

 Description

     This function simplifies mathematical expressions.  If constructions or
     functions become unnecessary.  SIGN() returns three different values, in
     accordance with the specified parameter:

        1        positive numbers
        0        the number 0
       -1        negative numbers

 Examples

     .  Show a positive number:

        ? SIGN(48335)      // Result: 1

     .  Show a negative number:

        ? SIGN(-258)       // Result: -1

 

Advertisements

Advertisements