[M3devel] LONGINT

Tony Hosking hosking at cs.purdue.edu
Tue Aug 7 23:49:23 CEST 2007


Shortly I will be checking in compiler and run-time updates that  
enable the LONGINT type:

	32 <= BITSIZE(INTEGER) <= BITSIZE(LONGINT) <= 64

Here are the changes to the language spec, in the form of context  
diffs to the updated reference manual, which is available at http:// 
www.cs.purdue.edu/~hosking/m3/reference/index.html.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Diffs
Type: application/octet-stream
Size: 15769 bytes
Desc: not available
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20070807/392cbb52/attachment-0003.obj>
-------------- next part --------------

I have gone for the minimalist approach to adding LONGINT to the  
language.  In brief, LONGINT is a distinct ordinal type from  
INTEGER.  Conversions can be performed using ORD and VAL.  For  
LONGINT 'n', ORD(n) converts n to an INTEGER.  For INTEGER 'n', VAL 
(n, LONGINT) converts n to a LONGINT.  Implicitly, this means all  
enumerations have an underlying INTEGER representation.  LONGINT  
subranges work as expected.  Open arrays are indexed by INTEGER  
values.  Fixed arrays can have an index type whose base type is  
LONGINT.  The rest of the changes to the language spec flow from  
these fundamentals.



More information about the M3devel mailing list