REBOL for COBOL programmers |
DIVIDE with REMAINDER
Date written: March 25, 2013 This page explains some REBOL equivalents of DIVIDE with REMAINDER. COBOL DIVIDE with REMAINDERDIVIDE has syntax allowing you to get the remainder. DIVIDE { identifier-1 } INTO { identifier-2 } GIVING identifier-3 [ROUNDED] REMAINDER identifier-4. { literal-1 } { literal-2 } DIVIDE { identifier-1 } BY { identifier-2 } GIVING identifier-3 [ROUNDED] REMAINDER identifier-4. { literal-1 } { literal-2 } The REBOL equivalentREBOL has a separate function for the reaminder. identifier-3: remainder identifier-1 identifier-2This divides the first item (identifier-1) BY the second (identifier-2) and returns the remainder, which in this case would be put into identifier-3. |