PDA

View Full Version : DC_READ_FREE and tab-delimited ascii files



rmfought
12-04-2007, 08:33 AM
This combination doesn't seem to work. Something I am missing?

Data file row looks like:
int<tab>int<tab>float<tab>float<tab>float<tab>float<CR>

ISTAT = DC_READ_FREE(FILENAME, var1, var2, var3, /Column)

var1 reads fine, but var2 and var3 are always empty.

If executed in row mode, works fine - all three vars get populated from first column.

Thanks,
Rich

rwagner
12-04-2007, 03:49 PM
Hi Rich,

Note that a tab is NOT a default delimeter for DC_READ_FREE. You have to
specify it using the DELIM keyword. A tab is octal 011, so here is one way of
specifying it:

status = DC_READ_FREE('file',v1,v2,..., Delim='\011')

or (an equivalent way to do this):

status = DC_READ_FREE('file',v1,v2,..., Delim=9B)

-Ryan