At 10:22 PM 6/5/02 -0400, Richard Kahl wrote:
>When performing calculations with currency or using the
>round function the values are not rounding correctly. ex
>set var vamt = (round(125.875,2)) is yielding 125.87 set
>var vamt = (12.5 * 36.55) is yielding 456.87 using 6.5++
>build 1.851 Does anyone know of what could cause this?
Richard,
You MUST define the data type first.
Syntax for ROUND:
Syntax: (ROUND(arg1, arg2))
Where : arg1 is the value to be rounded
arg2 is the position to be rounded after the
decimal point.
Example 01:
SET VAR vAmt CURRENCY
SET VAR vAmt = (ROUND(125.875,2))
Example 02:
SET VAR vAmt CURRENCY = (ROUND(125.875,2))
Example 03:
SET VAR vAmt DOUBLE
SET VAR vAmt = (ROUND(125.875,2))
Example 04:
SET VAR vAmt DOUBLE = (ROUND(125.875,2))
Enjoy and make sure to have fun!
Very Best Regards,
Razzak.
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/