[ncl-talk] code sytax question

Dennis Shea shea at ucar.edu
Fri Sep 16 16:07:21 MDT 2016


It is just the way arguments for functions and procedures are prototyped
for documentation.
I believe the square brackets used for documentation preceded the
introduction of the list variable.

Further, I believe that people thought there would be no confusion   :-)

So, in documentation

x[1]    ; a variable of size one (scalar)

x[*]   ; a 1D variable of any length

x[*][*]: a 2D variable

x    ; a variable of any shape and any type

=========
These may have additional constraints

x[*]:numeric

x[*]:integer

x[*][*]: string

etc


etc

On Fri, Sep 16, 2016 at 3:56 PM, Lijun Diao <ljdiao at gmail.com> wrote:

> Hi, NCL users:
>
> Sorry. I probably asked a similar question which I don’t rember. Can
> someone explain for me what the following * in lat[*] and the number 1 in
> Opt[1] means?
>
> procedure rectilinear_to_SCRIP(FName[1]:string,lat[*]:numeric,\
> 8 lon[*]:numeric, Opt[1]:logical)
>
> function isatt_logical_true(Opt[1]:logical,AttName[1]:string)
>
> The square looks like list, the it is defined as logical or numeric
> variable.
>
> thanks,
> ------------------------------------------------------------
> -----------------
> Lijun Diao
> ldiao at uh.edu
> Research Assistant
> Department of Earth & Atmospheric Sciences
> University of Houston
> 4800 Calhoun RD., Bldg. S&R1-312
> Houston, TX 77204-5007
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160916/df1a008f/attachment.html 


More information about the ncl-talk mailing list