<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
No, for simple scripts functions are not neccessary. You can quit
script with simple 'quit' at the end. If you don't give 'quit', script
will not close by itself after finish. But if you use functions, you
must close function with command return (without ' ' ).<br>
<br>
Regards,<br>
Ivan<br>
<br>
<br>
Wansang Ryu wrote:
<blockquote
 cite="mid:a930edd00910051251k3ae2f104j2737a9186aead56@mail.gmail.com"
 type="cite">Should the first line have 'function' command like
'function test (args)'?<br>
Is there any command to finish script file?<br>
  <br>
Thanks,<br>
  <br>
Wansang<br>
  <br>
  <br>
  <div class="gmail_quote">On Mon, Oct 5, 2009 at 2:44 PM, Ivan Toman <span
 dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:ivtoman@inet.hr">ivtoman@inet.hr</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hey,<br>
    <br>
you need to write plain text file with software like notepad. In that<br>
file, you put the same commands that you put in grads command prompt,<br>
just they need to be between these characters: ' '<br>
    <br>
For example, if you wish to plot temperature from command prompt, you<br>
will give this command:<br>
d tmp2m<br>
    <br>
In grads script, that should read:<br>
'd tmp2m'<br>
    <br>
That's almost all, but there are some differences between command line<br>
and scipting commands, and also, of course, in scripts you can do lot<br>
more things like creating loops and using lot more tools (for example<br>
defining custom functions), that you cannot do on command line.<br>
    <br>
Hope this helps. Also, please, read user manual here:<br>
    <a moz-do-not-send="true"
 href="http://www.iges.org/grads/gadoc/users.html" target="_blank">http://www.iges.org/grads/gadoc/users.html</a><br>
    <br>
And check some sample scripts to see how they work, for example:<br>
    <a moz-do-not-send="true"
 href="http://www.iges.org/grads/gadoc/library.html" target="_blank">http://www.iges.org/grads/gadoc/library.html</a><br>
    <br>
Bye, Ivan<br>
    <div>
    <div class="h5"><br>
    <br>
    <br>
    <br>
Wansang Ryu wrote:<br>
&gt; Dear Users,<br>
&gt;<br>
&gt; I am a new to Grads.<br>
&gt; I want to make a script file to save variables to a ASCII (*.txt)
file.<br>
&gt; Do I write a script in Grads directly or in a software like
notepad.<br>
&gt;<br>
&gt; And how I start to write it?<br>
&gt; I think I'm really lost.<br>
&gt; Please, teach me from the first step.<br>
&gt;<br>
&gt; Somebody help me!<br>
&gt;<br>
&gt; Wansang<br>
&gt;<br>
&gt; --<br>
&gt; College Station, TX 77843-3147<br>
&gt; Office: 305A CSA (Teague) Bldg<br>
&gt; (979) 845-2719<br>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Department of Geography<br>
Texas A&amp;M University<br>
College Station, TX 77843-3147<br>
(979) 845-2719<br>
</blockquote>
<br>
</body>
</html>