10.3.8 RD_TFILE


next up previous contents
Next: 10.3.9 DEF_TAPD Up: 10.3 Miscellaneous Previous: 10.3.7 PLOT_TRAV

10.3.8 RD_TFILE

RD_TFILE is a generic ASCII (text) file reading routine. It can be used to return the contents of any text file as an IDL array. A fast algorithm is used which makes it more than an order of magnitude faster than reading line by line until end-of-file. See the User's Guide description for more details. Calling Examples
IDL> text=rd_tfile(filename) ; orig. file-> string array
 
IDL> data=rd_tfile('fdata.dat',/auto,/convert) ; determine n columns and

IDL> ; data type automatically

IDL> text=rd_tfile('file.pro',nocomment=';') ; remove comment lines

IDL> passwd=rd_tfile('/etc/passwd',delim=':',/auto,/nocomment)


ydac@mssly1.mssl.ucl.ac.uk