|
Re: Is there a better way??? [message #77987 is a reply to message #77986] |
Tue, 11 October 2011 20:52  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Oct 11, 6:30 pm, Beaker <mattjamesfran...@gmail.com> wrote:
> nrows = <int derived after reading in data to temporary strarr line by
> line>
By the way, there is usually no need to read into a strarr line by
line. It is typically done with
lines=strarr(file_lines(file))
openr,unitr,file,/get_lun
readf,unitr,lines
free_lun,unitr
|
|
|
Re: Is there a better way??? [message #77988 is a reply to message #77987] |
Tue, 11 October 2011 19:37  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Oct 11, 6:30 pm, Beaker <mattjamesfran...@gmail.com> wrote:
> This feels like an awful hack, and has the limitiation that it can
> only be run once a session as I can't work out how to specify the name
> of the structure (since replicate can't be convinced to interpret a
> string as the name of a structure).
I do not see why it would run only once per session. Anyway, it seems
that what you are looking for is create_struct(), possibly with
idl_validname(). See the help on them.
|
|
|