RE: - Why does this compile?

From: null <">
Date: Wed, 10 Oct 2007 07:28:04 +0000

----boundary-LibPST-iamunique-494681658_-_-
Content-type: text/plain

Hi Rex,

> Yes, thanks. It just came as a surprise that it does
> not even attempt to check array bounds at compile time.
>

oops, not exactly. It does check at compile time, since

        MODULE TestBug;

        PROCEDURE Crash*;
          CONST i = 800;
          VAR a: ARRAY 4 OF REAL;
        BEGIN
          a[i]:= i
        END Crash;

        END TestBug.Crash

doesn't compile ...

regards
--
	Bernhard Treutwein, IuK, Ref. III A 3
	Bernhard.Treutwein(at)verwaltung uni-muenchen de
> -----Original Message-----
> From: blackbox{([at]})nowhere.xy> Behalf Of Rex Couture
> Sent: Tuesday, October 09, 2007 5:14 PM
> To: BlackBox Mailing List
> Subject: [BlackBox] - Why does this compile?
> 
> 
> At 01:42 AM 10/9/2007, Bernhard Treutwein wrote:
> >it compiles for the same reason why the following
> >compiles:
> >
> >PROCEDURE Crash*;
> >VAR i: INTEGER; a: ARRAY 4 OF REAL;
> >BEGIN
> >  i:= -800;
> >  a[i]:= i 
> >END Crash;
> 
> 
>         Yes, thanks.  It just came as a surprise that it does 
> not even attempt to check array bounds at compile time.
> 
> Rex Couture
> 
> --- BlackBox
> --- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy> 
> 
----boundary-LibPST-iamunique-494681658_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx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