Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!pattis From: pattis@june.cs.washington.edu (Richard Pattis) Newsgroups: comp.lang.modula2 Subject: Survey: Changing the Control Variable in a FOR Summary: Does this code compile on your compiler? Message-ID: <7257@june.cs.washington.edu> Date: 12 Feb 89 23:31:44 GMT Organization: U of Washington, Computer Science, Seattle Lines: 15 I'd like to conduct a brief survey on the net. Does your M-2 compiler allow the following code fragment? FOR I:=1 TO 10 DO I:= 1 END The M-2 report says, "Its [the control variable] value should not be changed by the statement sequence." (page 158, 3rd corrected edition) The Logitech VAX/VMS compiler that I have access to allows this code fragment. Is this statement aimed at the programmer or the compiler writer? Are there any other obvious examples of properties that could be statically checked by the compiler, but aren't required by the Modula-2 report? Thanks for your time. Rich Pattis