Fwd: NewList type parameter questions

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 08 2012 - 09:00:36 MST

Begin forwarded message:

> From: Wei Huang <huangwei@ucar.edu>
> Subject: Re: NewList type parameter questions
> Date: February 8, 2012 8:45:02 AM MST
> To: Karl-Hermann Wieners <karl-hermann.wieners@zmaw.de>
>
> Karl,
>
> It seems there is a bug to create a "concat" type list directly.
> We will try to fix this in the new release.
>
> By now, you try to work around with:
>
> ncl 4> a = NewList("fifo")
> ncl 5> ListSetType(a, "cat")
> ncl 6> print(a)
>
>
> Variable: a
> Type: list
> Total Size: 4 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Type: list <concat | fifo>
> Total items: 0
>
> Here, you create a "fifo" list, and then set it to type "cat".
>
> 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 Feb 8, 2012, at 4:11 AM, Karl-Hermann Wieners wrote:
>
>> Hi all,
>>
>> when playing around with the List routines, I stumbled across this puzzle:
>>
>> When I have this
>>
>> [...] NCAR Command Language Version 6.0.0 [...]
>> ncl 0> x = [/ 42 /]
>> ncl 1> print(ListGetType(x))
>> (0) cat
>> (1) fifo
>>
>> , then why is that the code below fails
>>
>> ncl 2> y = NewList("cat")
>> fatal:NewList: unknow list type
>> fatal:Execute: Error occurred at or near line 2
>>
>> , this does not fail, but doesn't give the default result (as for x)
>>
>> ncl 3> z = NewList("fifo")
>> ncl 4> print(ListGetType(z))
>> (0) fifo
>>
>> , and this works as expected?
>>
>> ncl 5> a = NewList("join")
>> ncl 6> print(ListGetType(a))
>> (0) join
>> (1) fifo
>>
>> Could anyone solve this for me?
>>
>> Cheers,
>> Karl
>> _______________________________________________
>> 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 Wed Feb 8 09:00:51 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 09 2012 - 13:33:26 MST