Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!bloom-beacon!eru!luth!sunic!dkuug!daimi!epimetheus!erja
From: erja@epimetheus.dk (Erik Jacobsen)
Newsgroups: comp.lang.modula2
Subject: Re: Logitech 3.x longint bug warning
Message-ID: <3317@daimi.dk>
Date: 28 Sep 89 13:13:56 GMT
References: <3298@watale.waterloo.edu>
Sender: news@daimi.dk
Reply-To: erja@daimi.DK (Erik Jacobsen)
Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
Lines: 39

In article <3298@watale.waterloo.edu> tom@mims-iris.waterloo.edu (Tom Haapanen) writes:
> [Deleted]
>Pretty sad ... so longints are STILL buggy in Logitech 3.x.  Can anybody
>check if this is also true in the OS/2 version?

We have version 3.03 of the LogiTech Modula2-compiler (MS-DOS).
We had this example today:

            PROCEDURE f(l1,l2: LONGINT): LONGINT;
            ...
          VAR
            l1,l2,l3: LONGINT;
            ...
            l1 := l1 + f(l2,l3);

This gave weird results in 'l1'. Rewriting to

            PROCEDURE f(l1,l2: LONGINT): LONGINT; 
            ... 
          VAR 
            l1,l2,l3,l4: LONGINT; 
            ... 
            l4 := f(l2,l3);
            l1 := l1 + l4;

gave the correct result.

Always make expressions involving LONGINTs as simple as possible,
using your own temporary variables (this of course only
applies to the LogiTech-compiler!).

Erik

--------------------------------------------------------------------
Erik Jacobsen,     Computer Science Department,    Aarhus University
Ny Munkegade,    Building 540,       DK-8000 Aarhus C,       Denmark

Phone: +45 86127188, Telefax: +45 86135725, Home phone: +45 86169199
         Internet: erja@daimi.dk,           Ham-radio: OZ6KS