[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: converting to array
- Subject: Re: converting to array
- From: davidf(at)dfanning.com (David Fanning)
- Date: Mon, 12 Mar 2001 12:53:23 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <3AAD266A.18D7DBBF@fys.ku.dk>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:23951
Martin Skou Andersen (email@example.com) writes:
> I have some data from a file...
> file start
> 10.5 30.5 40.8 57.9 90.8
> end of file
> I would like to read these data from a file, and these should be placed
> in a array...
> But when I read the file the datas are placed in a string. How do i get
> these data converted to a array?
array = FltArr(5) ; Or, however many values you have.
OPENR, lun, 'myfile.dat', /Get_LUN
READF, lun, array
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: firstname.lastname@example.org
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155