Re: http://www.ncl.ucar.edu/Applications/Scripts/polyg_17.ncl example

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Fri Dec 06 2013 - 11:28:10 MST

Joe,

Which version of ncl are you using:
ncl -Version

x := ….

is introduced in ncl-6.1.2, called reassign.

As you know, ncl is a strong typed language.
code like this:

a = 1

a = "abc"

won't work, as "a" can not change its type.
To make it work, you have to do:

a = 1

delete(a)
a = "abc"

in 6.1.2. we introduced ":=", which now you can do:

a = 1

a := "abc"

So, some new examples have adapted this code,
but these examples won't run with older version.

Regards,

Wei

huangwei@ucar.edu
VETS/CISL
National Center for Atmospheric Research
P.O. Box 3000 (1850 Table Mesa Dr.)
Boulder, CO 80307-3000 USA
(303) 497-8924

On Dec 6, 2013, at 11:19 AM, H. Joe Lee <hyoklee@hdfgroup.org> wrote:

> Hi,
>
> I cannot run the plyg_17.ncl example.
>
> Is ":=" typo?
>
> The blow is the error message:
>
> ------------------
> Copyright (C) 1995-2012 - All Rights Reserved
>
> University Corporation for Atmospheric Research
>
> NCAR Command Language Version 6.1.0
>
> The use of this software is governed by a License Agreement.
>
> See http://www.ncl.ucar.edu/ for more details.
>
> fatal:syntax error: line 113 in file polyg_17.ncl before or near :
>
> x :
>
> --------^
>
>
> fatal:error in statement
>
> fatal:Syntax Error in block, block not executed
>
> fatal:error at line 125 in file polyg_17.ncl
>
>
> fatal:syntax error: line 206 in file polyg_17.ncl before or near :
>
> ii :
>
> ---------^
>
>
> fatal:error in statement
>
> fatal:syntax error: line 208 in file polyg_17.ncl before or near :
>
> ii :
>
> ---------^
>
>
> fatal:error in statement
>
> fatal:syntax error: line 210 in file polyg_17.ncl before or near :
>
> ii :
>
> ---------^
>
>
> fatal:error in statement
>
> fatal:Syntax Error in block, block not executed
>
> fatal:error at line 238 in file polyg_17.ncl
>
>
> --
> HDF: Software that Powers Science
> _______________________________________________
> 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 Fri Dec 6 11:28:20 2013

This archive was generated by hypermail 2.1.8 : Fri Dec 13 2013 - 11:39:30 MST