Re: logical expressions - is this a bug?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 12 2011 - 11:12:07 MDT

Hi Adrian,

This is odd indeed. A simpler test has the same issue:

ncl 0> c1 = False
ncl 1> c2 = False
ncl 2> c2 = c2.and.c1
fatal:Execute: Error occurred at or near line 2

This one works:

ncl 0> c1 = False
ncl 1> c2 = False
ncl 2> c3 = c1.and.c2
ncl 3>

I've filed a ticket on this, NCL-1159. Thanks for reporting it.

--Mary

On Jul 12, 2011, at 10:02 AM, Tompkins Adrian wrote:

> Hello there,
>
> I'm not sure if this is a bug or a "feature" - but it seems that logical
> variables are overwritten as soon as they are "reached" in a logical
> expression.
>
> Example:
>
> This fails (c2 appears first on line 5, RHS)
> c1=False
> c2=True
> do i=0,10
> c2=c2.and.c1
> end do
>
> This works (c2 appears second on line 5, RHS)
> c1=False
> c2=True
> do i=0,10
> c2=c1.and.c2
> end do
>
> We are using NCAR Command Language Version 5.1.1
>
> thanks,
>
> Adrian
>
>
> --
> Adrian Tompkins | Earth System Physics
> +39 040 2240579 (office) | ICTP (UNESCO-IAEA)
> +39 040 2240449 (fax) | Strada Costiera 11
> www.ictp.it | 34151 Trieste, Italy
> _______________________________________________
> 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 Jul 12 11:12:18 2011

This archive was generated by hypermail 2.1.8 : Tue Jul 12 2011 - 15:03:53 MDT