Return to the RPG Tips
MOD function
Instead of using an API, you can simply do it (ignoring complications if the numbers were negative): m = mod (a,b) can be computed as: t = a / b (where t is integer) m = a - b * t OR >> Has anyone written a MOD() function? ....... It is called %REM in RPG IV - your example: if mod(12/4) = 0 Can be coded as: if %REM(12:4) = 0
[report a broken link by clicking here]