[gradsusr] Pass Data via the 'Return' Expression

Mark Sponsler msponsler at comcast.net
Mon Apr 12 15:09:25 EDT 2010



I have a script that calls a second script (and passes some arguments to it). That works fine. I'm trying to get the second script to return some data back to the first script, but am having difficulty.  I use the 'return' command to have the second script return control back the first script, but cannot seem to get any variable data to pass with it. It seems this is possible per the Grads documentation: 





To return from a function, use the return command: 

return expression 

The expression is optional; if not provided, a NULL string will be returned. (A null string is: '') The result of the function is the result of the expression specified on the return command. 



In the second script, the last line is: 



return val1 



Where val1 is a variable string 



Just can't seem to get the first script to read the contents of val1. Could always write the data to a file, but am looking for something a little more elegant. 



Any help would be appreciated, 
Mark 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100412/d5f1dc48/attachment-0003.html 


More information about the gradsusr mailing list