🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #877

Ident vs Designator

#877
From: Pat Terry
Date: Tue, 03 Jul 1990 21:24
38 lines
1404 bytes
In Message-ID: <INFO-M2%90070101452673@UCF1VM.BITNET> you write

 > I do not see why the use of Designators is not allowed.
 > 
 > FOR record.integer := 1 TO 10 DO
 > END; (* FOR *)
 > 

   VAR
     Funny : RECORD 
               CASE J : BOOLEAN OF
                 TRUE : I : CARDINAL;
                 FALSE : (* empty *)
               END
             END;

   BEGIN
     Funny.J := TRUE;
     FOR Funny.I := 1 TO 4 DO
        Funny.J := FALSE;
        (* now what *)
     END

FOR loop variables are supposed to be as simple as possible to stop them getting
messed up in any one of the dozens of perverted ways one might think of doing   
so.

It would be interesting to see a really good example of a FOR loop where one
wanted something other than a simple variable.

  




--  
uucp: uunet!m2xenix!puddle!5!494!4.101!Pat.Terry
Internet: Pat.Terry@p101.f4.n494.z5.fidonet.org
Technical Details
Message-ID: <1070.2690EBA8@puddle.fidonet.org>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!dali.cs.montana.edu!milton!unicorn!ogicse!cvedc!nosun!qiclab!m2xenix!puddle!p101.f4.n494.z5.fidonet.org!Pat.Terry

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!dali.cs.montana.edu!milton!unicorn!ogicse!cvedc!nosun!qiclab!m2xenix!puddle!p101.f4.n494.z5.fidonet.org!Pat.Terry
From: Pat.Terry@p101.f4.n494.z5.fidonet.org (Pat Terry)
Newsgroups: comp.lang.modula2
Subject: Ident vs Designator
Message-ID: <1070.2690EBA8@puddle.fidonet.org>
Date: 3 Jul 90 21:24:29 GMT
Sender: ufgate@puddle.fidonet.org (newsout1.26)
Organization: FidoNet node 5:494/4.101 - Settler City Fido, Grahamstown RSA
Lines: 38