[M3devel] INTEGER

Mika Nystrom mika at async.async.caltech.edu
Sun Apr 18 04:47:03 CEST 2010


Tony Hosking writes:
>
...
>
>> We need it to match 64-bit integers on 32-bit machines?  That seems =
>like
>> a very weak rationale indeed, if the same functionality could be =
>provided
>> through some other mechanism (e.g., ARRAY [0..1] OF INTEGER---even =
>with
>> a pragma e.g. <*CLONGLONG*>.. if it is necessary to tell the compiler =
>that
>> a special linkage convention is needed).
>
>There's no special linkage convention.  Not sure what you mean here.
>

I just mean if we had

TYPE LONGINT = ARRAY [0..1] OF INTEGER

that would perhaps not match how C handles "long long" on the same
platform (which is how, come to think of it?), and that would require
special linkage tricks.

But what would be lost?  The ability to type literals. 

You could get the same code interface on 32- and 64-bit machine by
defining

TYPE FileOffset = ARRAY[0..1] OF [-16_80000000 .. +16_7fffffff ]

and using that.


    Mika



More information about the M3devel mailing list