<br><font size=2 face="sans-serif">Bill,</font>
<br><font size=2 face="sans-serif">Typo, yes, and did copy by hand. Output
as listed was correct. Typo was on the arg2 input (should have said "gph").
Thanks for pointing out.</font>
<br><font size=2 face="sans-serif">Stephen</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Bill Bua <Bill.Bua@NOAA.GOV></b>
</font>
<br><font size=1 face="sans-serif">Sent by: GRADSUSR@LIST.CINECA.IT</font>
<p><font size=1 face="sans-serif">05/04/2006 11:07 AM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
GRADSUSR@LIST.CINECA.IT</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">GRADSUSR@LIST.CINECA.IT</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">Re: Passing parameters into
a script</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br><font size=2><tt>Hey Stephen --<br>
</tt></font>
<br><font size=2><tt>Looks like either you had a typo with the arg2 (if
you copied it over<br>
from the screen by hand) or there might actually be a problem with<br>
argument passing: shouldn't arg2 have been slp?<br>
</tt></font>
<br><font size=2><tt>Bill Bua<br>
</tt></font>
<br><font size=2><tt>Stephen R McMillan wrote:<br>
><br>
> Herb,<br>
> I use GrADS 1.8SL11 on a PC (Windows XP), and your script works fine<br>
> on my machine. Script I used, called testfunc.gs...<br>
><br>
> function main(args)<br>
> arg0=subwrd(args,1)<br>
> arg1=subwrd(args,2)<br>
> arg2=subwrd(args,3)<br>
> say 'arg0='arg0 ' arg1='arg1 ' arg2='arg2<br>
> return<br>
><br>
> Following is sample command line entry, and result of "say"
string:<br>
><br>
> > testfunc 04may2006 slp 500<br>
> arg0=04may2006 arg1=gph arg2=500<br>
><br>
> Note, I get the same output regardless of whether "return"
is at the<br>
> end of this simple script.<br>
><br>
> However, I have a feeling this does not address your problem, or does
it?<br>
><br>
> Stephen McMillan<br>
> Planalytics, Inc.<br>
> :<br>
><br>
><br>
> *Eric Salathé <salathe@WASHINGTON.EDU>*<br>
> Sent by: GRADSUSR@LIST.CINECA.IT<br>
><br>
> 05/03/2006 05:53 PM<br>
> Please respond to<br>
> GRADSUSR@LIST.CINECA.IT<br>
><br>
><br>
><br>
> To<br>
> GRADSUSR@LIST.CINECA.IT<br>
> cc<br>
><br>
> Subject<br>
> Re: Passing parameters into a script<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> Herb-<br>
><br>
> Your script works as expected in version 1.9b4 on linux. So this may
be<br>
> a PC GrADs issue...<br>
><br>
> -Eric<br>
><br>
><br>
> On May 1, 2006, at 11:13 AM, Herb Philbrick wrote:<br>
><br>
> > Hello all,<br>
> ><br>
> > I am unable to use parameters passed into a script and would
very much<br>
> > appreciate some guidance or an example.<br>
> ><br>
> > I see from the .pdf doc that there are two ways of invoking a
script.<br>
> > - using EXEC allows for 10 arguments referred to as &0-&9
in the<br>
> > script<br>
> > (p49)<br>
> > - using RUN does not allow for &0-&9 and I'm not
sure how the<br>
> > arguments<br>
> > are received. (p52)<br>
> ><br>
> > Apparently, EXEC does not accommodate the full scripting language,
so<br>
> > RUN is<br>
> > my focus.<br>
> ><br>
> > The sample script meteogram_avn.gs has * function main(args)
* as its<br>
> > first executable line. "args" is parsed to find
individual arguments.<br>
> > There is no * return * statement matching the *
function main(args)<br>
> > *<br>
> > statement.<br>
> ><br>
> > I have tried a simple script along the lines of:<br>
> > function main(args)<br>
> > arg0=subwrd(args,1)<br>
> > arg1=subwrd(args,2)<br>
> > arg2=subwrd(args,3)<br>
> > say 'arg0='arg0 ' arg1='arg1
' arg2='arg2<br>
> ><br>
> > The script bombs on the first line. (PCGrADS 1.8)<br>
> ><br>
> > I have tried searching the archives
but, I haven't been able<br>
> > to gain<br>
> > access, even after registering in numerous manners.<br>
> > A tip on accessing the archives would
be greatly appreciated,<br>
> > too.<br>
> ><br>
> ><br>
> > Thank you,<br>
> ><br>
> > Herb Philbrick<br>
> > Burns Harbor Plate<br>
> > voice 219-787-3321<br>
> > fax 219-787-2690<br>
> > herb.philbrick@mittalsteel.com<br>
> ><br>
> ><br>
> --<br>
> Eric Salathé<br>
> Climate Impacts Group <salathe@washington.edu><br>
> University of Washington<br>
> <http://www.atmos.washington.edu/~salathe><br>
><br>
> ************************************************************************<br>
> The information contained in this e-mail message is intended only
for<br>
> the personal and confidential use of the recipient(s) named above
and<br>
> may contain information that is privileged, confidential, and/or<br>
> proprietary to Planalytics, Inc. and its subsidiaries and affiliated<br>
> companies. This message may be an attorney-client communication
and<br>
> as such is privileged and confidential. If the reader of this
message<br>
> is not the intended recipient or an agent responsible for delivering<br>
> it to the intended recipient, you are hereby notified that you have<br>
> received this document in error and that any review, dissemination,<br>
> distribution, or copying of this message is strictly prohibited. If<br>
> you have received this communication in error, please notify the<br>
> sender immediately by e-mail, and delete the original message.</tt></font>
<br><font size=2><tt>> ************************************************************************</tt></font><font size=2 face="sans-serif"><br>
<br>
************************************************************************<br>
The information contained in this e-mail message is intended only for the
personal and confidential use of the recipient(s) named above and may contain
information that is privileged, confidential, and/or proprietary to Planalytics,
Inc. and its subsidiaries and affiliated companies. This message
may be an attorney-client communication and as such is privileged and confidential.
If the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and that
any review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify the sender immediately by e-mail, and delete the original
message.<br>
************************************************************************</font>
<br>