Re: data types and functions

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 13 Apr 2009 16:56:12 -0600

I think what you want is a C-style "pointer".

While the NCL core language is written in C,
it does not support "pointers" per se.

Perhaps, others know of a work around.

D

Dan Barrie wrote:
> Hi Dennis,
>
> Thanks for the help! We're on the same page, I just have to be clearer.
>
> As you say, if I type
> print(winds_name)
> it is a variable of type string and size [1]
> However, what I want is for winds_name to reference "winds" such that
> when I type
> print(winds_name)
> it prints out the values contained in the variable winds.
>
> -Dan
>
>
>
> Dennis Shea wrote:
>>
>> ====================
>>
>> I am probably not understanding the problem.
>> Just to be clear:
>>
>> winds_name = "winds"
>>
>> if you
>> print(winds_name) it is a variable of type string and size [1].
>>
>>
>>
>>
>>
>>
>>
>> Dan Barrie wrote:
>>> Dear NCL users,
>>>
>>> I am trying to loop through different variables by calling them by
>>> name using an array with their various names predefined. To simplify
>>> my question, I provide the following example:
>>>
>>> If I have defined a variable named "winds", I can easily print out
>>> the values it contains using the command print(winds).
>>>
>>> However, if I have defined a variable named winds, and another
>>> variable named winds_name = "winds", I cannot print out the values
>>> contained in winds by typing print(
>>> winds_name). Essentially, I need NCL to not care about the difference
>>> between winds and winds_name. Is this possible? I tried using the
>>> coercion functions, but that doesn't seem to be where the issue lies.
>>> Thanks in advance for the help.
>>>
>>> -Dan
>>> _______________________________________________
>>> 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 Mon Apr 13 2009 - 16:56:12 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 16 2009 - 10:05:49 MDT