<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">&nbsp; arg0=subwrd(args,1)</font>
<br><font size=2 face="sans-serif">&nbsp; arg1=subwrd(args,2)</font>
<br><font size=2 face="sans-serif">&nbsp; arg2=subwrd(args,3)</font>
<br><font size=2 face="sans-serif">&nbsp; say 'arg0='arg0 ' &nbsp;arg1='arg1
' &nbsp;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 &quot;say&quot; &nbsp;string:</font>
<br>
<br><font size=2 face="sans-serif">&gt; testfunc 04may2006 slp 500</font>
<br><font size=2 face="sans-serif">arg0=04may2006 &nbsp; arg1=gph &nbsp;
arg2=500</font>
<br>
<br><font size=2 face="sans-serif">Note, I get the same output regardless
of whether &quot;return&quot; 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é &lt;salathe@WASHINGTON.EDU&gt;</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>&gt; Hello all,<br>
&gt;<br>
&gt; I am unable to use parameters passed into a script and would very
much<br>
&gt; appreciate some guidance or an example.<br>
&gt;<br>
&gt; I see from the .pdf doc that there are two ways of invoking a script.<br>
&gt; &nbsp; - using EXEC allows for 10 arguments referred to as &amp;0-&amp;9
in the<br>
&gt; script<br>
&gt; (p49)<br>
&gt; &nbsp; - using RUN does not allow for &amp;0-&amp;9 and I'm not sure
how the<br>
&gt; arguments<br>
&gt; are received. (p52)<br>
&gt;<br>
&gt; Apparently, EXEC does not accommodate the full scripting language,
so<br>
&gt; RUN is<br>
&gt; my focus.<br>
&gt;<br>
&gt; The sample script meteogram_avn.gs has &nbsp;* function main(args)
* &nbsp;as its<br>
&gt; first executable line. &nbsp;&quot;args&quot; is parsed to find individual
arguments.<br>
&gt; There is no &nbsp;* return * &nbsp;statement matching the &nbsp;*
function main(args)<br>
&gt; *<br>
&gt; statement.<br>
&gt;<br>
&gt; I have tried a simple script along the lines of:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; function main(args)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; arg0=subwrd(args,1)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; arg1=subwrd(args,2)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; arg2=subwrd(args,3)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; say 'arg0='arg0 ' &nbsp;arg1='arg1 ' &nbsp;arg2='arg2<br>
&gt;<br>
&gt; The script bombs on the first line. &nbsp;(PCGrADS 1.8)<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; I have tried searching the archives but,
I haven't been able<br>
&gt; to gain<br>
&gt; access, even after registering in numerous manners.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; A tip on accessing the archives would
be greatly appreciated,<br>
&gt; too.<br>
&gt;<br>
&gt;<br>
&gt; Thank you,<br>
&gt;<br>
&gt; Herb Philbrick<br>
&gt; &nbsp; &nbsp; &nbsp;Burns Harbor Plate<br>
&gt; &nbsp; &nbsp; &nbsp;voice 219-787-3321<br>
&gt; &nbsp; &nbsp; &nbsp;fax &nbsp; &nbsp;219-787-2690<br>
&gt; &nbsp; &nbsp; &nbsp;herb.philbrick@mittalsteel.com<br>
&gt;<br>
&gt;<br>
--<br>
Eric Salathé<br>
Climate Impacts Group &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;salathe@washington.edu&gt;<br>
University of Washington</tt></font>
<br><font size=2><tt>&lt;http://www.atmos.washington.edu/~salathe&gt;</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. &nbsp;This message
may be an attorney-client communication and as such is privileged and confidential.
&nbsp;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. &nbsp;If you have received this communication in error,
please notify the sender immediately by e-mail, and delete the original
message.<br>
************************************************************************</font>
<br>