OT: case statements in sh

Bill Campbell bill at celestial.com
Wed Jan 25 10:39:20 PST 2006


On Tue, Jan 24, 2006, Jay R. Ashworth wrote:
>On Tue, Jan 24, 2006 at 05:40:52PM -0800, Bill Campbell wrote:
>> On Tue, Jan 24, 2006, Jay R. Ashworth wrote:
>> >On Tue, Jan 24, 2006 at 07:15:45PM -0500, Bob Stockler wrote:
>> >> And if you really get techincal about it, the final ";;"
>> >> is not required (thought it looks pretty there, and makes
>> >> things "look better".
>> >
>> >It's not required by the interpreter.  But if you ever decide to
>> >re-sort your case blocks, you'll discover that it's very handy indeed
>> >to have around.  :-)
>> 
>> As a general rule, using a ``feature'' like that will always come
>> back to bite you in the butt, and be hard to find.
>
>You're talking about Bob's suggestion to skip the last terminator line,
>then?  I confuse easily.  :-)

Yes, that's what I was talking about in the specific case.

The first time I learned not to use non-standard ``features'' was almost 40
years ago when I had taken advantage of an extended subroutine return with
a FORTRAN compiler.  This caused me significant grief when I had to run the
programs on a different vendor's FORTRAN compiler.

A basic problem often is that a person learns a language on one vendor's
system, and doesn't know that things they use are unique to that vendor.
As an example both FORTRAN and COBOL subroutine calls were completely
recursive on Burroughs compilers.  I learned COBOL on the Burroughs Medium
Systems (B-2500->B-4800), and had a fair amount of rewriting to do when
moving to IBM and rmcobol systems.

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Systems, Inc.
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

"If taxation without consent is robbery, the United States government
has never had, has not now, and is never likely to have, a single honest
dollar in its treasury." -- Lysander Spooner, Letter to Grover Cleveland 1886


More information about the Filepro-list mailing list