Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watmath.UUCP Path: utzoo!watmath!idallen From: idallen@watmath.UUCP Newsgroups: net.unix-wizards Subject: Re: possible problem in csh if/then/endif Message-ID: <2724@watmath.UUCP> Date: Sun, 19-Oct-86 22:49:09 EDT Article-I.D.: watmath.2724 Posted: Sun Oct 19 22:49:09 1986 Date-Received: Tue, 21-Oct-86 21:54:48 EDT References: <113@pixar.UUCP> <1901@well.UUCP> Reply-To: idallen@watmath.UUCP (Ian! D. Allen) Distribution: net Organization: U of Waterloo, Ontario Lines: 14 Keywords: csh bugs Summary: another csh IF bug The parser for IF/ENDIF is even more interesting than that. Try this one: if ( 0 ) then if ( 0 ) echo You just do not think then endif The parser that skips to the ENDIF thinks that the middle line is an if-then line, because it starts with IF and ends with THEN. So it pairs it up with the ENDIF on the third line and goes looking for a *second* ENDIF... Who wrote this stuff? -- -IAN! (Ian! D. Allen) University of Waterloo