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