` Modulo for Decimals (Alexey Solovjev ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Modulo for Decimals
1999-02-24 -- Alexey Solovjev
 
Modulo arithmetic on non-integers converts internally to a Real. This can result in rounding errors. Thus, % can return false positives with decimals. DecModulus PROCEDURE (*DECIMAL A, *DECIMAL B, *DECIMAL Res) CODE Res = A % B IF Res = B Res = 0 END RETURN


Today is November 21, 2024, 8:09 am
This article has been viewed 35193 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: