From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2f2ae3c6286f407b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-11-03 03:35:38 PST Path: supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!feeder.qis.net!europa.netcrusader.net!152.163.239.131!portc03.blue.aol.com!audrey04.news.cs.com!not-for-mail From: rbbaldwin8@cs.com (Rbbaldwin8) Newsgroups: comp.lang.ada Subject: Tokenizing a string in Ada NNTP-Posting-Host: ladder07.news.cs.com X-Admin: news@cs.com Date: 03 Nov 2000 11:35:37 GMT Organization: CompuServe (http://www.compuserve.com/) Message-ID: <20001103063537.25697.00000237@ng-mf1.news.cs.com> Xref: supernews.google.com comp.lang.ada:1743 Date: 2000-11-03T11:35:37+00:00 List-Id: Hello. I'm new at Ada and have a problem in an application I need to write. I need to read lines from a text file which consist of a mixture of strings and numeric values separated by commas and use these values in the application. The format of each line is the same as far as which data is in each position. I think the safest way to do this is to read each line into a fixed-length string, then split it at the commas. Strings in the CSV lines are not quoted but do not contain commas within the strings. How can I do this in Ada. I can't find a string function like C's strtok or TCL's split, or am I misssing something. Thanks in advance for your help.