![]()  | 
REBOL for COBOL programmers | 
DIVIDE
Date written: March 25, 2013 This page explains some REBOL equivalents of DIVIDE. COBOL DIVIDEDIVIDE has a syntax just like you might say it, including but not limited to: 
DIVIDE { identifier-1 } INTO identifier-2 [ROUNDED].
       { literal-1    }
DIVIDE { identifier-1 } INTO { identifier-2 } GIVING identifier-3.
       { literal-1    }      { literal-2    }
DIVIDE { identifier-1 } BY { identifier-2 } GIVING identifier-3 [ROUNDED].
       { literal-1    }    { literal-2    }
There are other options for remainders and size errors, as you probably
know.
The REBOL equivalentREBOL has a "divide" function. It also has the "/" function which is the same, and a separate "remainder" function for getting at the remainder. identifier-2: divide identifier-1 identifier-2 identifier-3: divide identifier-1 identifier-2  |