[M3devel] Integers

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Thu Jan 7 17:46:20 CET 2010


I have some questions as to the constraints that need to be placed on 
integral types.  These issues are fundamental to an understanding of the 
role of LONGINT, INTEGER, and CARDINAL, and what we should be doing 
about them.

Is there a need for an integer type that can contain all the sizes of 
integers that can be handled by the language?  I'll call it TOP just so 
I can talk about it easily.

If it is necessary, is TOP only needed to make the language definition 
clean and concise?  Conversely, is it necessary for TOP to be available 
to programmers?  Is it necessary for TOP to be efficiently implemented, 
or implemented at all?

Even if it is not available directly to programmers, are there language 
features that require it internally?

Is it necessary that, for every two integer subranges I and J, there 
exist an integer range K such that both I and J are subranges of K?

The most commonly used integral type is INTEGER.  It seems to be the 
type used by programmers by default when they don't want to think of 
the specific range they will need.  But is it necessary for the type 
called INTEGER to be TOP?  Or, is there is no maximum implemented 
integral type, is it still necessary for INTEGER to be a maximal 
integral type?

-- hendrik




More information about the M3devel mailing list