home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!cs.utexas.edu!convex!convex!tchrist
- From: Tom Christiansen <tchrist@convex.COM>
- Subject: Re: C shell nested 'if' problem
- Originator: tchrist@pixel.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1992Aug28.134444.7751@news.eng.convex.com>
- Date: Fri, 28 Aug 1992 13:44:44 GMT
- Distribution: usa
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- References: <=+dn+c-.darrell@netcom.com>
- Nntp-Posting-Host: pixel.convex.com
- Organization: Convex Computer Corporation, Colorado Springs, CO
- Keywords: csh
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 30
-
- From the keyboard of darrell@netcom.com (Darrell Sell):
- :I have a csh problem with nested if--else if--else statements. The
- :example below, gives the expected branching behavior, only if the parens
- :are removed from the first inner if expression. With the parens
- :it gets confused if the first if expression is false.
- :
- :Books like "Unix in a Nutshell" or "The Unix C Shell Field Guide" or the
- :csh man page don't say anything on the topic.
-
- Ah, but csh.whynot certainly does!
-
- COMMAND ORTHOGONALITY
-
- Stupid parsing bugs
-
- White space can matter:
- if(expr)
- may fail on some versions of csh, while
- if (expr)
- works!
-
-
- Maybe I should make this a periodic posting?
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
-
- "AT&T -- anything better is illegal."
- -- Keith Lofstrom, comp.unix.bsd, "AT&T sues BSDI" thread
-