Article View: comp.lang.modula2
Article #406Re: The WITH statement
From: R_Tim_Coslet
Date: Thu, 23 Nov 1989 19:18
Date: Thu, 23 Nov 1989 19:18
32 lines
1710 bytes
1710 bytes
>In Article: <89321.154018ODX@PSUVM.BITNET>
> ODX@PSUVM.BITNET (Tim Larson) Wrote...
>
> WITH A[i] DO REPEAT WrInt(f, -1); INC (i) UNTIL i > 3 END;
>
> (see the program [deleted] following this message) which I intended to mean
:
>
> REPEAT WrInt(A[i].f, -1); INC (i) UNTIL i > 3;
>
I think the code you REALLY wanted was...
REPEAT WITH A[i] DO WrInt(f, -1); INC (i) END UNTIL i > 3;
> I believe that the WITH statement as defined in Modula-2 is a bad idea.
I believe that if you use it right, there are no statements in Modula-2 that
are a "bad idea"!
It is the responsibility of the programmer to understand the tools (i.e.
statements) provided to him by the language (i.e. Modula-2) or environment
(i.e. Operating System) that he is working with. As I see it, if he then
uses those tools wrong and the program breaks... it is as much his problem
as it would be the problem of a carpenter that chooses to use screwdrivers
as chisels and the wood he is working on breaks.
In both cases I would consider the user (programmer or carpenter) of the
tool (WITH statement or screwdriver) not the supplier of the tool to be
the cause of the problem (because he "misused" the tools).
R. Tim Coslet
Usenet: R_Tim_Coslet@cup.portal.com
BIX: r.tim_coslet
Technical Details
Message-ID:
<24410@cup.portal.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!apple!fox!portal!cup.portal.com!R_Tim_CosletReferences:
<89321.154018ODX@PSUVM.BITNET>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!apple!fox!portal!cup.portal.com!R_Tim_Coslet From: R_Tim_Coslet@cup.portal.com Newsgroups: comp.lang.modula2 Subject: Re: The WITH statement Message-ID: <24410@cup.portal.com> Date: 23 Nov 89 19:18:31 GMT References: <89321.154018ODX@PSUVM.BITNET> Organization: The Portal System (TM) Lines: 32