[M3devel] LONGINT

Dirk Muysers dmuysers at hotmail.com
Sat Mar 10 16:50:14 CET 2012


Yes, that compiles, but looks a bit perverse since one intuitively is induced to
think that the VAL source should fit the VAL destination because it is a "legal"
LOOPHOLE and should be submitted to the same restrictions as the latter.


From: Antony Hosking 
Sent: Saturday, March 10, 2012 4:32 PM
To: Dirk Muysers 
Cc: m3devel at elegosoft.com 
Subject: Re: [M3devel] LONGINT


Have you tried ORD(VAL(x, INTEGER)) where x is a LONGINT?


I’m surprised about the second problem.  Perhaps it is not yet fixed in that release.


On Mar 10, 2012, at 10:06 AM, Dirk Muysers wrote:


  It is my understanding that ORD(x), where x is a LONGINT should return x 
  as an INTEGER, provided the (hidden) range check succeeds.
  It actually fails to compile (cm3 5.8.6 on Win32) with "Incompatible types (n)".
  And, also, one can't specify a LONGINT literal greater than LAST(INTEGER).
  ("invalid longint literal").

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120310/df5d1f3f/attachment-0002.html>


More information about the M3devel mailing list