Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
I've often wondered the reason why the following: IDL> a=0 IDL> if a and b then print,'yes' % Variable is undefined: B. % Execution halted at: $MAIN$ Many languages stop evaluating logical expressions as soon as the result can be determined. I'm sure there's a good reason why IDL doesn't, but it means that in my code I use a lot of these: if n_elements(a) GT 0 then $ if a EQ 5 then $ where I *would* have liked to say: if n_elements(a) GT 0 and a EQ 5 then $ Anybody know any background on this? / Russ Welti /-\ rwelti@u.washington.edu \-/