Re: evaluate string as a variable

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed, 19 Sep 2007 15:15:33 -0600

Hi Guillaume,

We have it on our to-do list to implement string to symbol
dereferencing for regular variables
using $-$ syntax similar to what is available for file variables and
attributes now.
Hopefully this can be done fairly soon.

A true 'eval' command will probably have to wait a bit longer.
  -dave

On Sep 19, 2007, at 1:14 PM, guillaume mauger wrote:

>
> Hi All,
>
> An example:
>
> aa = new(3,"integer")
> bb = "aa"
>
> now, I would like to be able to do something akin to the following:
>
> print(all(ismissing($bb$)))
>
> and have it return the result evaluated for the variable 'aa'.
>
>
> Alternatively, if there is a way to evaluate a string as an ncl
> command, e.g.:
>
> eval( "print(all(ismissing(" + bb + ")))" )
>
>
> Is there a way I can do this?
>
> thanks,
> guillaume
>
> --
> guillaume mauger
> http://ieng9.ucsd.edu/~gmauger/
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Sep 19 2007 - 15:15:33 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 24 2007 - 11:44:39 MDT