comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: evaluation of logical expressions

evaluation of logical expressions
type: item
description: 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 \-/
creator: Russ Welti
date: 1995-09-21T07:00:00-00:00