1. comma delimit, quote qualified.
- Posted by "Lucius L. Hilley III" <lhilley at CDC.NET> Oct 10, 1999
- 396 views
------=_NextPart_000_0015_01BF1322.15AF77A0 charset="iso-8859-1" CSV - Comma Separated Values. Here are a few routines to nicely handle what you may be looking for. Can handle properly formatted files without a hitch. Can handle CSV files with and without quote qualifiers. Can handle mixture of with and without the quotes. The zip contains sample data and sample program. The sample program can be removed and made the function renamed into a .e include file. Includes the raw source that I wrote and processed using version 2.11 of my macro preprocessor. usage: line = gets(file) --get a line from the file. fields = CSV(line) --parses the line into separate fields. You can then convert any sequence of numbers "1234" into an atom by including and using value(). Lucius L. Hilley III lhilley at cdc.net lucius at ComputerCafeUSA.com +----------+--------------+--------------+----------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | Computer | | Horse +--------------+--------------+ Cafe' | | Software | http://www.cdc.net/~lhilley | USA | +----------+-------+---------------------+----------+ | http://www.ComputerCafeUSA.com | +--------------------------------+ ----- Original Message ----- From: Steven G Astley <sgastley at HOTMAIL.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Sunday, October 10, 1999 8:46 AM Subject: i'm confused? > ---------------------- Information from the mail header ----------------------- > Sender: Euphoria Programming for MS-DOS <EUPHORIA at LISTSERV.MUOHIO.EDU> > Poster: Steven G Astley <sgastley at HOTMAIL.COM> > Subject: i'm confused? > -------------------------------------------------------------------------- ----- > > Rob's helped some, thx Rob, ... but ... > > Can Euphoria(U4) handle business applications? > I need to read ASCII, comma delimited files of several thousand records > with a dozen variable length fields, load into a table/array, massage the > field data in many ways, do some statistical analysis and print a report. > Is this possible? > eg,record layout: date, var1, var2, var3, var4, var5, var6 > > Does anyone have an example of this type of processing? or portions there > of? I don't understand how U4 can handle field processing. Can it? > > thx, sga > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > ------=_NextPart_000_0015_01BF1322.15AF77A0 name="csv.zip"