‎2008 May 28 12:38 PM
Hi experts,
wa_billing_doc4-fkimg = abs ( wa_billing_doc3-fkimg ) * sign ( wa_billing_doc4-netwr ).
Does anyone know what the sign command do? I tried using F1 but it is showing help for SELECT options.
‎2008 May 28 12:39 PM
Hi,
SIGN
Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of arg is positive
Thanks,
Sriram Ponna.
‎2008 May 28 12:40 PM
Hi,
SIGN built-in function returns value as below:
Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of arg is positive.
It is one of the overloaded functions where the data type of the argument determines the data type of the return value.
Regards
Suresh Radhakrishnan
‎2008 May 28 12:46 PM
Hi,
The argument arg of a mathematical function must represent a numeric value. The data type of the return value is determined either by the argument of the function (overloaded functions) or by the function itself (floating point functions).
Outside of an arithmetic expression, the argument of a mathematical function must be a single, numeric data object. Within an arithmetic expression - that is, in the statement COMPUTE - the argument of a mathematical function can also be an arithmetic expression. In particular, a mathematical function in an arithmetic expression can have a different built-in function or a functional method as argument.
Overloaded Functions
The following table shows the overloaded functions where the data type of the argument determines the data type of the return value.
Function func Return value
abs Absolute value of the argument arg
sign Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of arg is positive.
ceil Smallest integer number that is not smaller than the value of the argument arg.
floor Largest integer number that is not larger than the value of the argument arg.
trunc Value of the integer part of the argument arg
frac Value of the decimal places of the argument arg
Regards,
Shiva Kumar
‎2008 May 28 12:50 PM
Hi,
SIGN (X) is 1 when the value of X is positive values.
SIGN(X) is -1 When the value of X is negative. &
SIGN(X) is 0 when the value of X is 0
Where X is your input number
Regards,
Raghu