<!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"><<a moz-do-not-send="true" href="mailto:ivtoman@inet.hr">ivtoman@inet.hr</a>></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>
> Dear Users,<br>
><br>
> I am a new to Grads.<br>
> I want to make a script file to save variables to a ASCII (*.txt)
file.<br>
> Do I write a script in Grads directly or in a software like
notepad.<br>
><br>
> And how I start to write it?<br>
> I think I'm really lost.<br>
> Please, teach me from the first step.<br>
><br>
> Somebody help me!<br>
><br>
> Wansang<br>
><br>
> --<br>
> College Station, TX 77843-3147<br>
> Office: 305A CSA (Teague) Bldg<br>
> (979) 845-2719<br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Department of Geography<br>
Texas A&M University<br>
College Station, TX 77843-3147<br>
(979) 845-2719<br>
</blockquote>
<br>
</body>
</html>