Maybe I am using a slightly old version (2.95.2 19991024 (release)) but the following little program indicates there is something awry with the upper limits of cardinals.
At least cardinal(32) and cardinal(64) should be able to calculate up to 4294967296 and 18446744073709551616 respectively. Note if I try and assign these directly within the program, the program doesn't compile with errors:
constant out of range
for the 32 bit case and
value does not fit in longest integer type
for the 64 bit case.
Cardinals limited by fewer bits (eg 20 and 24 but non-boundary anyway) should give 0 or overflow but in fact they all return 2^n in the calculations, even there n is greater than the nominal maximum but I have not used a packed variable.
John
program testnumb; type c32=cardinal(32); c20=cardinal(20); c24=cardinal(24); c64=cardinal(64); var i,ii:c32; j:c20; jj:c24; jjj:c20; k,kk:c64; l:byte; begin i:=1;ii:=1;j:=1;jj:=1;jjj:=1;k:=1;kk:=1; for l:=1 to 31 do i:=i*2; for l:=1 to 32 do ii:=ii*2; for l:=1 to 20 do j:=j*2; for l:=1 to 22 do jj:=jj*2; for l:=1 to 24 do jjj:=jjj*2; for l:=1 to 63 do k:=k*2; for l:=1 to 64 do kk:=kk*2; writeln(i); writeln(ii); writeln(j); writeln(jj); writeln(jjj); writeln(k); writeln(kk); end.