(cond((= s "Y") 1) ((= s "y") 1) ((= s "N") 0) ((= s "n") 0) (t (alert "Variable (s) in not equal to any of the above check outs "))) Its not what i meant? Put simply, a test expression of 't' will always be validated and so this represents a default condition for when all other conditions are not met; such a condition is by no means necessary, but usually provided by the documentation to help explain how to include a default condition.
It looks like you understand this. The equivalent in another syntax style could be
if (s=="Y")
return 1
elseif (s=="y")
return 1
elseif (s=="N")
return 0
elseif (s=="n")
return 0
else
alert( "Variable (s) in not equal to any of the above check outs ")
endif
Think of (t ....) as being an all-inclusive "else" or "otherwise".
页:
1
[2]