<br><font size=2 face="sans-serif">Herb,</font>
<br><font size=2 face="sans-serif">I use GrADS 1.8SL11 on a PC (Windows
XP), and your script works fine on my machine. Script I used, called testfunc.gs...</font>
<br>
<br><font size=2 face="sans-serif">function main(args)</font>
<br><font size=2 face="sans-serif"> arg0=subwrd(args,1)</font>
<br><font size=2 face="sans-serif"> arg1=subwrd(args,2)</font>
<br><font size=2 face="sans-serif"> arg2=subwrd(args,3)</font>
<br><font size=2 face="sans-serif"> say 'arg0='arg0 ' arg1='arg1
' arg2='arg2</font>
<br><font size=2 face="sans-serif">return</font>
<br>
<br><font size=2 face="sans-serif">Following is sample command line entry,
and result of "say" string:</font>
<br>
<br><font size=2 face="sans-serif">> testfunc 04may2006 slp 500</font>
<br><font size=2 face="sans-serif">arg0=04may2006 arg1=gph
arg2=500</font>
<br>
<br><font size=2 face="sans-serif">Note, I get the same output regardless
of whether "return" is at the end of this simple script.</font>
<br>
<br><font size=2 face="sans-serif">However, I have a feeling this does
not address your problem, or does it?</font>
<br>
<br><font size=2 face="sans-serif">Stephen McMillan</font>
<br><font size=2 face="sans-serif">Planalytics, Inc.</font>
<br><font size=2 face="sans-serif">:</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Eric Salathé <salathe@WASHINGTON.EDU></b>
</font>
<br><font size=1 face="sans-serif">Sent by: GRADSUSR@LIST.CINECA.IT</font>
<p><font size=1 face="sans-serif">05/03/2006 05:53 PM</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>Herb-<br>
</tt></font>
<br><font size=2><tt>Your script works as expected in version 1.9b4 on
linux. So this may be<br>
a PC GrADs issue...<br>
</tt></font>
<br><font size=2><tt>-Eric<br>
</tt></font>
<br>
<br><font size=2><tt>On May 1, 2006, at 11:13 AM, Herb Philbrick wrote:<br>
</tt></font>
<br><font size=2><tt>> 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</tt></font>
<br><font size=2><tt><http://www.atmos.washington.edu/~salathe></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>