Re: How to read a csv file when the date comes with /?
Ed <emammendes@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
.
Relevant Pages
- Proposal: String::Format::General
... It provides format string parsing and output assembly, you provide the code that implements the individual conversion characters. ... Format syntax is kind of a cross between sprintf and strftime, but how close it is to each of these depends on the semantics implemented by the user. ... Note that the following is pre-alpha documentation; the interface to the output conversion code has changed since yesterday, ... conversion character, and contain a number of optional fields which may ... (comp.lang.perl.modules) - Proposal: String::Format::General
... This should be considered pre-Alpha, since it has changed since yesterday, and I am seriously considering passing the format parameters to the output conversion code as a hash reference instead of a large number of arguments. ... Some limited heading capability is provided. ... This module provides a formatter class which allows its user to ... (comp.lang.perl.modules) - Re: dateTime Manupulations
... Notice the quoted string, a specific format for a date & time. ... will need to convert that string into a DateTime. ... > datetime conversion between strings, however it was a datetime conversion ... (microsoft.public.dotnet.languages.vb) - Proposal: String::Format::General
... It's almost a meta-formatter with the user providing individual conversion code behind a sprintf/strftime-like interface. ... A format is basically a string into which data are to be inserted. ... conversion character, and contain a number of optional fields which may ... (comp.lang.perl.modules) - Re: Proposal: String::Format::General
... It's almost a meta-formatter with the user providing individual conversion code behind a sprintf/strftime-like interface. ... A format is basically a string into which data are to be inserted. ... conversion character, and contain a number of optional fields which may ... (comp.lang.perl.modules) |
|