OK, this is indeed rather bizarre. I'm filing a bug report on this. Also, it evidently has nothing to do with getenv(), per se:
ncl 0> OK=True
ncl 1> foo=new(1,"logical")
ncl 2> OK=OK.and.(.not.ismissing(foo))
ncl 3> OK=OK.and.(.not.ismissing(foo))
fatal:Execute: Error occurred at or near line 3
And also,
ncl 0> OK=True
ncl 1> OK = OK.or.(.not.ismissing(getenv("dummy")))
fatal:Execute: Error occurred at or near line 1
And this one..
ncl 0> OK=True
ncl 1> OK=OK.and.(ismissing(getenv("dummy")))
ncl 2> OK=OK.and.(ismissing(getenv("dummy")))
ncl 3> OK=OK.and.(ismissing(getenv("dummy")))
ncl 4>
Rick
On Apr 16, 2011, at 1:21 AM, Vladyslav Lyubartsev wrote:
> The following script runs without problems
>
> OK = True
> OK = OK.and.(getenv("dummy").ne."missing")
> OK = OK.and.(getenv("dummy").ne."missing")
> OK = OK.and.(.not.ismissing(getenv("dummy")))
> OK = OK.and.(.not.ismissing(getenv("dummy")))
>
> But the following script produces fatal errors
>
> OK = True
> OK = OK.and.(.not.ismissing(getenv("dummy")))
> OK = OK.and.(.not.ismissing(getenv("dummy")))
> OK = OK.and.(getenv("dummy").ne."missing")
> OK = OK.and.(getenv("dummy").ne."missing")
>
> fatal:Execute: Error occurred at or near line 3 in file test_missing.ncl
> fatal:Execute: Error occurred at or near line 4 in file test_missing.ncl
> fatal:Execute: Error occurred at or near line 5 in file test_missing.ncl
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 19 02:33:08 2011
This archive was generated by hypermail 2.1.8 : Tue Apr 19 2011 - 18:32:02 MDT