possible problem in csh if/then/endif

idallen at watmath.UUCP idallen at watmath.UUCP
Mon Oct 20 12:49:09 AEST 1986


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



More information about the Comp.unix.wizards mailing list