Hello,
It seems short circuit evaluation in logical operations does not work for
arrays.
ncl 11> v = new(1,integer)
ncl 12> v = -999
ncl 13> print( (.not.ismissing(v)) .and. (v.le.0) )
(0) False
ncl 14> a = new(3,integer)
ncl 15> a = (/-1,-999,1/)
ncl 16> print( (.not.ismissing(a)) .and. (a.le.0) )
(0) True
(1) Missing
(2) False
b(1) is Missing, VERY inconvenient, workaround is necessary.
Regards,
Slava
P.S. I do not like missing logical values in NCL. It is not binary logic,
but ternary logic, a lot of problems for people coming to NCL from "common"
languages.
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Oct 02 2009 - 08:49:56 MDT
This archive was generated by hypermail 2.2.0 : Mon Oct 05 2009 - 13:28:34 MDT