Re: How to read a csv file when the date comes with /?
- From: Ed <emammendes@xxxxxxxxx>
- Date: Sun, 29 Jun 2008 11:31:59 -0700 (PDT)
On 29 jun, 12:34, nos...@xxxxxxxxxxxxx (Richard Maine) wrote:
Ed <emammen...@xxxxxxxxx> wrote:
Never mind! I've got it.
i=2;read(unit=line(spos(i-1)+1:spos(i)-1) ,fmt='(A)')dh
i=3;read(unit=line(spos(i-1)+1:spos(i)-1) ,fmt='(A)')dhb
While that should work, it is more complicated than you ned. Internal
reads are mostly for converting data from string to numeric form, using
the conversion facilities already built into the compiler's format
processing. When you use an internal read with an 'A' format, you aren't
really doing any conversion, so the internal read is unnecessary. You
could just do
i=2; dh = line(spos(i-1)+1:spos(i)-1)
i=3; dhb = line(spos(i-1)+1:spos(i)-1)
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
Many thanks. It works just fine and I don't need to write an extra
code for nothing.
Ed
.
- References:
- How to read a csv file when the date comes with /?
- From: Ed
- Re: How to read a csv file when the date comes with /?
- From: Thomas Koenig
- Re: How to read a csv file when the date comes with /?
- From: Ed
- Re: How to read a csv file when the date comes with /?
- From: Ed
- Re: How to read a csv file when the date comes with /?
- From: Richard Maine
- How to read a csv file when the date comes with /?
- Prev by Date: Re: How to read a csv file when the date comes with /?
- Next by Date: Re: How to read a csv file when the date comes with /?
- Previous by thread: Re: How to read a csv file when the date comes with /?
- Next by thread: Re: How to read a csv file when the date comes with /?
- Index(es):
Relevant Pages
|