Date: Sat, 29 Sep 2001 17:39:45 +0100
Reply-To: John Whittington <John.W@MEDISCIENCE.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: John Whittington <John.W@MEDISCIENCE.CO.UK>
Subject: Re: VALUE
In-Reply-To: <759FC8B57540D311B14E00902727A0C0061A1B72@a1mbx01.pharma.co m>
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 13:34 28/09/01 -0400, Diskin, Dennis wrote:
>John; I guess I must fall mostly into the purist category when it comes to
>'structured programming'. I don't use LEAVE or CONTINUE partly because I
>grew up with CONTINUE being a NO-OP construct in FORTRAN.
Yes, I suppose I would also call you a 'purist' in that case. The
important question is obviously WHY one adopts such a point of view. If
there is an arguable basis, even if not universally agreed, then that's
fine. It's people who worship what they regard as 'structured
programming', just for the sake of it, that I find more difficult to
understand.
Not using LEAVE or CONTINUE (as well as GOTO) can surely sometimes make
life 'unnecessarily' difficult for you? DO WHILE and DO UNTIL can only
undertake tests at the top or bottom of a loop - whereas there can be a
need to 'LEAVE' or 'CONTINUE' a loop at some intermediate point between the
top and bottom. Although I'm sure that there are usually 'ways around it',
I suspect that the resultant code could be a lot less clear.
>On the other hand, I have to admit that some of
>my DO i=... WHILE ( ); can be confusing for a novice.
Not only for novices, I'd suggest. If you look at the example I posted (in
response to Paul T) earlier today, I think that even the most experienced
of programmers would take longer to satisfy themselves of what was
happening in the DO WHILE version than the GOTO version.
>I consider the SELECT/WHEN structure to be a good fit to the structured
>programming concept, and much more readable than a horde of nested
>IF-THEN_ELSE's.
Yes, one might argue that - but the two alternatives are really very
similar in appearance -and, as Ian know tells me, also in execution.
>I do have to confess to occasionally using the EOF=, pretty much
>exclusively for report headings/footings.
Ah - a 'conditional purist' :-)
>It all boils down to individual style. I certainly would not try to tell
>anyone that they could not use any given feature in an ad hoc program but,
>my more recent clients have all had standards which restricted various
>forms. One company even prohibited SQL from production programs because
>the person who wrote the standard found it 'confusing'.
Yep, in the final analysis it is down to individuals' views and tastes.
Kind Regards,
John
----------------------------------------------------------------
Dr John Whittington, Voice: +44 (0) 1296 730225
Mediscience Services Fax: +44 (0) 1296 738893
Twyford Manor, Twyford, E-mail: John.W@mediscience.co.uk
Buckingham MK18 4EL, UK mediscience@compuserve.com
----------------------------------------------------------------