[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gm2] Still some LONGINT problems
From: |
John B. Wallace, Jr. |
Subject: |
[Gm2] Still some LONGINT problems |
Date: |
Tue, 9 Nov 2004 19:56:00 -0500 |
I was able to build the latest cvs sources (8 Nov. 2004) without any
problems
and assignment of positive LONGINT constants larger than MAX(INTEGER) worked
correctly for all the cases I tried. However, there were problems with the
assignment of negative LONGINT constants larger (more digits) than
MIN(INTEGER).
The following code produces warnings (shown below) when compiled and an
incorrect output when run.
MODULE TestLong;
FROM StrIO IMPORT WriteLn;
FROM FpuIO IMPORT WriteLongInt;
VAR
LongIntegerVariable : LONGINT;
BEGIN
LongIntegerVariable := -12345678901234;
WriteLongInt(LongIntegerVariable,0);
WriteLn
END TestLong.
address@hidden dev]$ gm2 -g -I. -c TestLong.mod
TestLong.mod:1: warning: overflow in constant expression
TestLong.mod: In function `_M2_TestLong_init':
TestLong.mod:11: warning: overflow in implicit constant conversion
The ouput on my system is:
-1942892530
John Wallace
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gm2] Still some LONGINT problems,
John B. Wallace, Jr. <=