[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Format strings with comma separated lists
- Subject: Re: Format strings with comma separated lists
- From: gurman(at)gsfc.nasa.gov (Joseph B. Gurman)
- Date: Mon, 10 May 1999 08:04:41 -0400
- Newsgroups: comp.lang.idl-pvwave
- Organization: NASA Goddard Space Flight Center
- References: <firstname.lastname@example.org>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:14678
In article <email@example.com>, firstname.lastname@example.org wrote:
> I hoping that someone else understands format strings better than I
> do, because I can't get them to work at all. I was wondering if anyone
> knew how to read a comma delimited list using format strings, such as
> Readf, lun, variable, FORMAT='(n(F6.6, :, ","))'
> ...this is the way I would think that you should do it but this just
> tells me that end of input record encountered.
> Does anyone know how to do it?#
> Phil Aldis
I believe this takes someone old enough to have learned programming
first in FORTRAN....
For formatted reads, you basically want to include only variable
descriptors and spaces (nX), so the colon and "," are counterproductive.
Have you tried something of the form:
IDL> READF, lun, variable, FORMAT = '$(n(f6.6, 2x))
That is, you just want to skip the commas and read the floating-point
Hope this is what you're looking for.
Joseph B. Gurman / NASA Goddard Space Flight Center / Solar Physics Branch /
Greenbelt MD 20771 / work: email@example.com /other: firstname.lastname@example.org
Government employees are still not allowed to hold opinions while at work,
so any opinions expressed herein must be someone else's.