nested ifs' in csh dont work?

ittc!fbresz at uunet.uu.net ittc!fbresz at uunet.uu.net
Fri Jun 1 22:46:10 AEST 1990


[[Ed's Note: about two million people answered this one (I should have if
I had been paying a little more attention). In any event, my apologies to
everyone else that sent a note who did not get included. Below is the
correct solution. -bdg]]

>if($a == 1) then
>   if($b == 1) then
    [...]

Due to the way that CSH parses if's, you must separate everything with
spaces.  When I did this to your code it worked fine.

if ( $a == 1 ) then
   if ( $b == 1 ) then



More information about the Comp.sys.sun mailing list