Integer arithmetic - a question

chris hermansen clhermansen@gmail.com
Sun Jul 20 18:20:48 GMT 2025


Hello all,

I notice that in GNU Algol 68 integer arithmetic wraps around, that is

int i = max_int;
int j = i + 1;
puts("i = " + whole(i,0) + "'n");
puts("j = " + whole(j,0) + "'n");
skip

prints

i = 2147483647
j = -2147483648

This is great for my hash functions, but I'm wondering if the intent is to
keep this approach going forward?

Thanks in advance!
-- 
Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/algol68/attachments/20250720/143e7b95/attachment.htm>


More information about the Algol68 mailing list