Jump to content

Arithmetic/Integer: Difference between revisions

→‎{{header|ALGOL 68}}: corrected the description of the Algol 68R '/:=' operator.
(→‎{{header|ALGOL 68}}: corrected the description of the Algol 68R '/:=' operator.)
Line 263:
a UP b = a**b = a↑b = +1.499007808785573768814747570e+288
</pre>
[[ALGOL 68R]] has the curious (and consequently non-standard) '/:=' operator. This operator
is equivalent to the OVERAB operator of the revised report, except it delivers twothe INTsremainder as a result. eg.
So a '/:=' b sets a to the quotient of a%b and returns the remainder of a%b as a result.
Note that it must be "stropped" i.e. enclosed in single quotes. eg.
INT quotient:=355, remainder;
remainder := quotient '/:=' 113;
Giving a quotient of 3, and a remainder of 16.
 
3,048

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.