× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

there are two ways:
1. EVAL(H) to round to the result decimal positions
2. Built-in-Function %DECH() to round to any decimal position.

 /Free
    Eval(H) Result = Field1 * Field2;
    Result = %DecH(Field1 * Field2: 11: 2);  //Round to 2 decimal positions
 /End-Free

Mit freundlichen Gru?en / Best regards

Birgitta

"Shoot for the moon, even if you miss, you'll land among the stars." 
(Les Brown) 

-----Ursprungliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von
steema@xxxxxxxxxxxxx
Gesendet: Dienstag, 11. April 2006 17:21
An: RPG programming on the AS400 / iSeries
Cc: rpg400-l@xxxxxxxxxxxx
Betreff: Rounding in ILE?


 Hi!
I am not seeing how to round in ILE. I am doing a simple MULT statement
and consistently am 1 penny off as compared to the users.
Thanks,
Steve

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.