Article View: comp.lang.misc
Article #5263Re: From Modula to Oberon
From: Erland Sommarskog
Date: Thu, 10 Mar 1988 22:07
Date: Thu, 10 Mar 1988 22:07
24 lines
1404 bytes
1404 bytes
Erik Jacobsen (erja@daimi.UUCP) writes:
>That is in fact the problem with FOR-loops - at least as they exist
>today.
>...
>If you write programs for portability, you must know what subset of
>valid FOR-loops will compile and execute correctly in all implementations
>of the langauge (and possibly in other languages), and otherwise use
>WHILE/REPEAT-loops.
I have already referred to Ada and I will again. Ada as I see it have
the perfect solution: The loop variable is declared in the FOR-
statement, and is thus not accessible afterwards. I can't but see
that that definition solves the problems. No, if this had possible
for WHILE-loops to!
A side note: Since REPEAT loops are quite rare and an source of
error when used in the wrong place, it surprises me that Wirth
removed too, to make his compiler even simpler.
--
Erland Sommarskog
ENEA Data, Stockholm
sommar@enea.UUCP "Souvent pour s'amuser les hommes d'equipages
and it's like talking to a stranger" -- H&C.
Technical Details
Message-ID:
<2827@enea.se>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!enea!sommarShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.lang.misc Subject: Re: From Modula to Oberon Message-ID: <2827@enea.se> Date: 10 Mar 88 22:07:34 GMT Reply-To: sommar@enea.UUCP(Erland Sommarskog) Followup-To: comp.lang.misc Organization: ENEA DATA AB, Sweden Lines: 23 Keyword: FOR-loops