[gradsusr] Meaning of "FUNCTION MAIN(args)"

Jeff Duda jeffduda319 at gmail.com
Thu Oct 11 19:32:32 EDT 2012


http://www.iges.org/grads/gadoc/script.html is a good place to get started,
namely, the section on functions.

Furthermore, if you surround your entire script code in a function (call it
whatever you want, but MAIN is a common name), any args within the function
call can get passed into the script code from the command line instead of
having to set them in the code or ask the user to input them after invoking
the script.  It makes for a nice easy way to call a grads script from some
other scripting language like C-shell with the flexibility of using
whatever arguments you want.

Jeff Duda

On Thu, Oct 11, 2012 at 5:25 PM, Guisseppe Arturo Vasq. <
hibiki_inuyasha at yahoo.es> wrote:

> Hi, all
>
> I'm new in grads and i was looking for some scripts to make my own
> scripts, but i have a problem i don't know how to interpret "FUNCTION
> MAIN(args)" .... what does it want to say? ..... anyone could explain me
> with some examples....
>
> thank so much
>
> Guisseppe Vasquez V.
> Agraria University, Lima-Peru
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20121011/a6c1885e/attachment-0003.html 


More information about the gradsusr mailing list