[M3devel] another longint variant

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Sun Jan 10 04:04:13 CET 2010


On Sun, Jan 10, 2010 at 12:05:23AM +0000, Jay K wrote:
> 
> I believe Rodney said something like "mixed operations follow from assignability";
> and from a language point of view, that may be true, just not from the point of view;
> 
> 
> You know, if I can assign a LONGINT to an INTEGER, and then add it to an INTEGER;
> what is the difference vs. just allowing direct addition?

Let's add -16_080000003L to +16_7ffffffff.
The sum should be 4.
What you propose will give overflow when assigning LONGINT to INTEGER.
You have to do the addition as LONGINT and then assign the sum to 
INTEGER.

-- hendrik



More information about the M3devel mailing list