comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » dc_read_free
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
dc_read_free [message #5094] Wed, 20 September 1995 00:00
orbach is currently offline  orbach
Messages: 9
Registered: June 1994
Junior Member
I'm having trouble understading how the /resize keyword works
in the function dc_read_free in WAVE.

Say that I have a file called data.txt, which consists of two
columns and 100 rows. The first column has file names (and is
thus strings) and the second column has snapshot numbers (and
is thus integers).

I find that if I predefine a variable, say, names, as

WAVE> names = ""

and predefine another variable, say, snaps, as

WAVE> snaps = intarr(500)

and then say

WAVE> result = dc_read_free('data.txt', names, snaps, /column, $
/resize)

the result is that the string array names will resize correctly
to however many elements there are in the first column (in this
case 100), but the integer array snaps will not do so (that is,
it remains a 500-element array).

Even more strange than this, if instead I predefine snaps as

WAVE> snaps = intarr(1)

i.e. to be an array smaller than the number of columns in the
file, now neither snaps nor names will resize correctly, and
in this case, they will both remain arrays with only 1 element
in them.

Anyone get this?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: machar
Next Topic: Re: input line too long for buffer

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:55:19 PDT 2025

Total time taken to generate the page: 0.00551 seconds