[thelist] CF: List Manipulations

Joshua Olson joshua at alphashop.com
Thu Oct 18 06:48:04 CDT 2001


----- Original Message -----
From: "Frank" <framar at interlog.com>
Subject: [thelist] CF: List Manipulations


:
: I've created a little utility to import a tab/return/comma delimited
: text file into a database. I've got two questions.
:
: 1) I want to make it a little more robust, so that if the list is
: somehow inconsistent that it returns an error. Can someone suggest
: how I may go about verifying the consistency of a list?

I know that Rory already asked a question about this, but I want to ask a
couple specific questions about the data you are importing and the
destination of the data:

1. Does each delimited item in the import file represent a single record.

2. Does each row of data in the import file represent a record where each
otherwise delimted record represent a field in that record.

3. Are any values quotes?

4. If so, and the field and/or record delimiters appear within the quotes,
are they included within the field?

5. If row=record, is there a set number of fields that you expect in each
row?

6. Are you able to determine ahead of time the number of expected records?

: 2) I've been trying to figure out how to get my app to identify what
: delimits a list. Imagine I have a list of emails, delimited by
: commas. From a machine point of view '@', '.' or ',' might be the
: delimiters. Now if one of the emails happens to be missing with '@'
: or the '.', once can see how quickly a problem could arise.

If you are truly trying to get the application to figure out which delimters
are used when you have no idea of what they could be, CF may be the wrong
language.

CF is good for rapid development, but sadly underpowered to do some
computational wizardry.  You may have to code some parts of this in C and
use CFX to tie it all together.  I've written a text parser, which I will
post at request, which is CF only and goes through a file 1 character at a
time, dumping strings into fields and records.  It understands quotes, and
quotes within quotes.  But, it is slow as hell.  I'd love someone with a lot
of CFX experience to convert it into a CFX tag.  But, it does work how it
stands now, so let me know.

-joshua


:
: I currently get the user to tell the app what the delimiter is, but I
: want to dummy proof as well as error proof. Can someone suggest how I
: could determine the delimiter of a list?
:
: Thanks.
: --
:
: Our best destiny, as planetary cohabitants, is the development
: of what has been called "species consciousness" - something over
: and above nationalisms, blocs, religions, ethnicities.
:
:
: Frank Marion                      Framar Studios
: frank at framarstudios.com           http://www.framarstudios.com
:
: ---------------------------------------
: For unsubscribe and other options, including
: the Tip Harvester and archive of TheList go to:
: http://lists.evolt.org Workers of the Web, evolt !
:





More information about the thelist mailing list