Article View: comp.lang.pascal.borland
Article #281Re: RTE200 - not Delay!
From: Arno Fehm
Date: Mon, 14 Jun 1999 00:00
Date: Mon, 14 Jun 1999 00:00
30 lines
1407 bytes
1407 bytes
Robert AH Prins wrote:
>
> const
> a: longint = $80000000;
> b: longint = -1;
>
> begin
> writeln(a div b);
> end.
>
> Any clues as to how to get rid of this one?
Hmm... The problem seems to be: The result should create an arithmetic
overflow, but creates RTE200.
But what about this:
const
a: longint = $80000000;
begin
writeln(a); { result: -2147483648 }
writeln(-a); { result: -2147483648 }
end.
--
Arno Fehm (afehm@bigfoot.de)
------------------------------------------------------------------------
Member of Grey Dreams Design: visit http://GreyDreams.home.pages.de !!!!
He who can destroy a thing has the real control over it. (Frank Herbert)
------------------------------------------------------------------------
Technical Details
Message-ID:
<37652E11.DCAF414C@bigfoot.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7k34er$qcn$1@nnrp1.deja.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108ebd,9ab1c9cdd12e03da X-Google-Attributes: gid108ebd,public X-Google-Thread: 111659,9ab1c9cdd12e03da X-Google-Attributes: gid111659,public From: Arno Fehm <afehm@bigfoot.de> Subject: Re: RTE200 - not Delay! Date: 1999/06/14 Message-ID: <37652E11.DCAF414C@bigfoot.de> X-Deja-AN: 489493058 Content-Transfer-Encoding: 7bit References: <7k34er$qcn$1@nnrp1.deja.com> Organization: Regionales Rechenzentrum Erlangen, Germany Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.pascal.borland,borland.public.turbopascal