[gradsusr] converting variable to string
Jeff Duda
jeffduda319 at gmail.com
Tue Aug 12 14:35:05 EDT 2014
You don't need to do it that way. Defining a script variable (within a
Grads script) is as simple as
var = value (no quotes)
So, for you, it would be
par = 10
'print filename_value'par'.eps'
where the extra single quotes remove the string "par" from the Grads
command and replace it with its script variable value.
Jeff Duda
On Tue, Aug 12, 2014 at 1:28 PM, Laura Zamboni <lzamboni at mcs.anl.gov> wrote:
> Hello,
>
> how can I convert a grads variable to a string within a script? What I'd
> like to do is the following:
> 'define par=10'
> (instructions)
> 'print filename_value<par>.eps'
> in which I'd like to see the value "10" in lieu of <par>
>
> Thanks,
> Laura
>
> --
> -------------------------
> My research and why I got to Argonne curious?
> http://www.anl.gov/articles/laura-zamboni
>
> -------------------------
> -------------------------
> Laura Zamboni, PhD
> Computational Postdoctoral Fellow - Climate Scientist
> Board member of the Postdoctoral Society of Argonne - Chair of the PSA
> mentoring committee
> Argonne National Laboratory, MCS Division
> 9700 S.Cass Ave
> TCS Bldg #240, room 4152
> Argonne, IL 60439
> ph.+1 630-252-1131
> fax. +1 630-252-5986
> web: http://www.mcs.anl.gov/~lzamboni/
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
--
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140812/4a58822b/attachment.html
More information about the gradsusr
mailing list