Re: File Handeling and Sorting

new topic     » goto parent     » topic index » view thread      » older message » newer message

Lets take a look at what is considered standard import/export
format.  Also its common flexibilities and allowances.

CSV - Comma Seperated Values
The standards for it are simple.

1. Most programs expect a set number of fields.
   In other words.  If the first line has 6 fields it
   expects the remaining entries to contain the same
   number of 6 fields.

2. Many programs expect or allow the first line of fields
   to be names for the fields.
   Example:
     Key,First,Last
     1,Lucius,Hilley
     2,Ferlin,Scarborough

3. Many but not all programs allow for use of commas in the field
   by using what is called a text qualifer, However the qualifer
   itself is rarely allowed in the field because of its use as
   a qualifer.  Standard Qualifer is the double quote ".
   Example:
     "Key","Product","Colors"
     "1","Fancy Watch","Red, Green, & Blue"
   That would come up as:
   Key      Product             Colors
     1      Fancy Watch         Red, Green, & Blue

4. Some programs allow you to Use a different seprating value and/or
   qualifer.
     Standard:
       Seperator: Comma
       Qualifier: Double Quote
     Possiblities:
       Seperator: Tab, Exclamation Point
       Qualifier: Single Quote, Exclamation Point

5. Random access can be faster if the size of the fields doesn't vary.
6. Some programs do allow for a varying number of fields per line.





        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: Ferlin Scarborough <ferlin at SANDW.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Thursday, September 02, 1999 10:10 AM
Subject: File Handeling and Sorting


> ---------------------- Information from the mail
header -----------------------
> Sender:       Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
> Poster:       Ferlin Scarborough <ferlin at SANDW.NET>
> Subject:      File Handeling and Sorting
> --------------------------------------------------------------------------
-----
>
> All,
>
>         I need to know what is the best way to handle the following File
> situation:
>
> I need to have a file that consists of the following type of structure
>
> [KEY FIELD] [FIELD1] [FIELD2] [FIELD3] ...... and so on.
>
> I need to sort the file based on the KEY FIELD, also the fields
> following the KEY FIELD are of varying types and lengths, some records
> will have
> more FIELDS than others.
>
> I also need to have the information encrypted and compressed to save
> space, I would like to have a fairly fast access time if possible.
>
> I was just wondering if there was already some kind of Library or
> include file already written to handle this type of situation or if I
> need to write it myself, my thoughts would be, why should I re-invent
> the wheel.
>
> Thanks In Advance for any help offered.
>
> Later All,
> --
> + + +  Rev. Ferlin Scarborough  -  Centreville, Alabama  -  USA
>
>           http://sites.netscape.net/fscarborough/homepage
>           http://members.theglobe.com/ferlin
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu