[gradsusr] Predefined script variables in GrADS

Jennifer Adams jma at cola.iges.org
Fri Jun 20 08:26:23 EDT 2014

On Jun 20, 2014, at 5:47 AM, DrRakhi R wrote:

> Hi all,
> What is the use and usage of the predefined variables "result"and "rec" GrADS script ? Kindly give some examples.
The 'result' variable contains the message that GrADS would write to the command window if you were running in interactive mode. 

The 'rc' (note it is not 'rec') variable contains a return code -- 0 if the command succeeded, 1 if there was an error. 

Here is a script example using both rc and result:

'open model.ctl'
if (rc=0) 
  say result
  say 'failed to open file'


> I appreciate your reply
> Thanks
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140620/23d60c30/attachment.html 

More information about the gradsusr mailing list