Article View: comp.lang.modula2
Article #887FOR LOOP indicies
From: Brian
Date: Thu, 05 Jul 1990 17:35
Date: Thu, 05 Jul 1990 17:35
14 lines
954 bytes
954 bytes
I personally like the way ADA (and supposidly Modula-3) handle FOR loops. If you are going to restrict the type of the index variable for easy compilation why not declare the variable at compilation time? The type can be determined from the limits of the FOR loop. And since it is an auto variable, its existance is limited to scope of the FOR loop. It should also be possible (but maybe not efficient) to check to see if the memory location of the index has been changed, thus generating a run-time error. ross@ucf1vm.bitnet ross@ucflan.cc.ucf.edu
Technical Details
Message-ID:
<INFO-M2%90070513582985@UCF1VM.BITNET>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!UCF1VM.BITNET!ROSSShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!UCF1VM.BITNET!ROSS From: ROSS@UCF1VM.BITNET (Brian) Newsgroups: comp.lang.modula2 Subject: FOR LOOP indicies Message-ID: <INFO-M2%90070513582985@UCF1VM.BITNET> Date: 5 Jul 90 17:35:22 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Modula2 List <INFO-M2%UCF1VM.BITNET@PSUVM.PSU.EDU> Organization: The Internet Lines: 14