Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site gumby.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!uwvax!gumby!g-frank From: g-frank@gumby.UUCP Newsgroups: net.lang.mod2 Subject: FOR statement in Modula-2 Message-ID: <259@gumby.UUCP> Date: Sun, 27-Jan-85 12:08:47 EST Article-I.D.: gumby.259 Posted: Sun Jan 27 12:08:47 1985 Date-Received: Tue, 29-Jan-85 06:57:15 EST Distribution: net Organization: U of Wisconsin CS Dept Lines: 15 In a recent message, it was asked whether FOR loops in Modula-2 had to execute at least once, like the DO loop in FORTRAN. It is, indeed, pretty unclear from Wirth's description in his book (how many people besides me consider the book a bad advertisement for the language?). I went and compiled a test program and found (phew) that FOR loops with an empty range execute ZERO times. The compiler was Logitech Modula-2/86 on an IBM PC. -- Dan Frank "good news is just life's way of keeping you off balance."