Re: Array of objects

From: <Daniel.Leuenberger_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 28 2011 - 08:58:54 MST

Hi Dave,

Thanks a lot for this information. Such a list is exactly what I was
looking for, and if it gets even better in version 6.0.0, perfect! Will
the basic syntax stay the same? Could you provide me with the
information about what will change in 6.0.0?

I will try out the list for my application and will let you know.

Best regards
Daniel
________________________________________

Daniel Leuenberger
Numerical Models

Federal Departement of Home Affairs FDHA Federal Office of Meteorology
and Climatology MeteoSwiss

Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland

Tel. +41 44 256 97 10
Fax +41 44 256 92 78
daniel.leuenberger@meteoswiss.ch
www.meteoswiss.ch - First-hand information
  

> -----Original Message-----
> From: David Brown [mailto:dbrown@ucar.edu]
> Sent: Donnerstag, 27. Januar 2011 23:50
> To: Leuenberger Daniel
> Cc: ncl-talk@ucar.edu
> Subject: Re: Array of objects
>
> Hi Daniel,
>
> There are some undocumented capabilities in NCL 5.2.1 for
> doing some of things you are looking for. In 6.0.0 there will
> be additional capabilities. I am attaching a small script
> that shows what you can do now. Note that a major hole in the
> functionality is a way to get a count of the number of
> elements in the list without keeping an independent count.
> That should be available in 6.0.0, along with syntax for
> creating a list from literal elements (i.e., given variables,
> any type, create a list l):
>
> l = [/ a, b, c /]
>
> Briefly, the routines available now are:
>
> functions:
> l = NewList(listtype : string) ; valid types are "cat",
> "join" (both specific to file lists -- at least for now),
> "fifo" (first in first out), and "lifo" (last in first out)
> v = ListPop(l) ; removes and returns an element from the list
> s2 = ListGetType(l) ; returns a string array of length two :
> (0) "cat" or "join" (1) "fifo" or "lifo"
>
> procedures:
>
> ListPush(l, var_or_value)
> ListSetType(l, listtype : string) ; only accepts a single
> string, not an array.
>
> As far as I can tell the "lifo" and "fifo" options do not
> seem to do anything currently, and of course "cat" and "join"
> seem kind of meaningless for heterogeneous lists.
>
> These are undocumented because as you can see they are not
> all completely defined, and some aspects of their behavior
> may change.
> But we would be happy for you to try out what is available
> and please make suggestions.
>
> -dave
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jan 28 08:59:04 2011

This archive was generated by hypermail 2.1.8 : Mon Jan 31 2011 - 10:38:24 MST