| 1 | module MathDivFull; |
| 2 | (* Math.divMod with hi >= d, whose quotient doesn't fit a word, stops the |
| 3 | program as a division by zero does *) |
| 4 | import Math, Out; |
| 5 | |
| 6 | proc main*; |
| 7 | var q, r: U64; |
| 8 | begin |
| 9 | q, r := Math.divMod(5, 0, 5); |
| 10 | Out.hex(q + r, 1); |
| 11 | end; |
| 12 | |
| 13 | end MathDivFull. |