in reply to Re: Recursive If statement not working.
in thread Recursive If statement not working.
where p = lc($autosubmit) eq "y" and q = lc($autosubmit) eq "n" if $autosubmit is "Y", then p is True and q is false (lc("Y") = "y" but lc("Y") does not equal "n"), thus the statement as a whole is false and we do not enter the loop. The only time the loop is activated is if both conditions fail ( that is $autosubmit is neither "y" nor "n" ). Conversely (or contrapositively, whatever the term is - I forget), the same could be written as:p q ~p ~q p^q ~p v ~q ~( p ^ q ) T T F F T F F T F F T T F F F T T F T F F F F T T F T T
shown above as ~(p ^ q)unless ( lc($autosubmit) eq "y" or lc($autosubmit) eq "n" )
|
---|