[M3devel] LONGINT

Rodney M. Bates rodney.bates at wichita.edu
Thu Jul 19 23:33:28 CEST 2007

Randy Coleburn wrote:
> Tony:
> I'd like to better understand the implications of your change as I do 
> use LONGINT as an index in some applications.

Do you have arrays that need 64-bit subscripts on a 32-bit machine?

Allow me the common assumption that both integers and addresses have
the native word size on most machines.  In this case, most arrays that
need 64-bit subscripts would exceed the virtual address space of the
machine.  Exceptions would require elements of size at most a byte,
and overall sizes in excess of half the virtual address space. Even
PACKED ARRAY [..] OF BITS 1 FOR BOOLEAN would need to use 1/8 the
virtual space before 32-bit subscripts ran out.  All this seems pretty

I would favor keeping INTEGER as the type of open array subscripts
and not allowing LONGINT to be a fixed array subscript type.  It
saves a whole lot of language complexity, and doesn't disallow much.

If it really mattered, you could still use unsafe techniques for
such memory-hogging arrays.  This might be a reason to extend unsafe
arithmetic on ADDRESS to accept LONGINT second operands.  This is
actually consistent with the rest of the operator generalizations.

Rodney M. Bates, retired assistant professor
Dept. of Computer Science, Wichita State University
Wichita, KS 67260-0083
rodney.bates at wichita.edu

More information about the M3devel mailing list