Yet even MORE Csh Quirks

Chris Torek chris at umcp-cs.UUCP
Sat Apr 20 16:44:10 AEST 1985


You have run into the C Shell's "parser": ifs inside false ifs must
have whitespace after the word "if"; elsewhere, ifs may be separated
from their arguments by parentheses.  Thus

	if (anything_false)
		foo
		if(anything)
			bar
		endif
		echo oops
	endif

fails, while

	if (anything_false)
		foo
		if (anything)
			bar
		endif
		echo oops
	endif

succeeds.  The only difference is a single space.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at maryland



More information about the Comp.unix.wizards mailing list