[gradsusr] is "read" deprecated?

Jennifer M Adams jadams21 at gmu.edu
Tue Apr 12 10:44:39 EDT 2016


The ‘read’ function is alive and well. Perhaps you are trying to use it as a grads command instead of a script command? Or maybe you are forgetting to capture the information returned by read into another script variable? You should share (in the simplest way possible) your specific use of ‘read’ and the error message you get back.

file=‘blah.txt’
rest=read(file)
line1=sublin(rest,1)
line2=sublin(rest,2)
retc=subwrd(line1,1)
if (retc=0)
* do something with the string in the script variable called line2
else
  say ‘finished reading ‘file
endif

—Jennifer



On Apr 12, 2016, at 10:00 AM, Rick Danielson <onto.limbo at gmail.com<mailto:onto.limbo at gmail.com>> wrote:

     There remains a reference to "read" at

http://cola.gmu.edu/grads/gadoc/script.html#intrinsic

but as of grads-2.0.2 and above, this intrinsic function
appears to be unrecognized.  Having the option to read
some simple ASCII data and add a few extra marks on
a graphic seems worthwhile.  Is it now only an option
to do so via, say, pygrads?
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160412/f50b0791/attachment.html 


More information about the gradsusr mailing list