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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c26a0bb87e0a1da4,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!c16g2000yqd.googlegroups.com!not-for-mail From: "J.s" Newsgroups: comp.lang.ada Subject: Does ada have a sscanf equivalent? Date: Mon, 22 Feb 2010 01:08:45 -0800 (PST) Organization: http://groups.google.com Message-ID: <5e46b3e8-f7ea-45a6-a884-6882f6ec8295@c16g2000yqd.googlegroups.com> NNTP-Posting-Host: 71.56.32.142 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1266829725 12802 127.0.0.1 (22 Feb 2010 09:08:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 22 Feb 2010 09:08:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c16g2000yqd.googlegroups.com; posting-host=71.56.32.142; posting-account=9sSOLAoAAABguukttEnE7BTWuhamXqod User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9285 Date: 2010-02-22T01:08:45-08:00 List-Id: I am trying to translate some C code that parses a string into numbers (both Integers and Floats) from an input file. Would it be easiest to just import the C function or is there an Ada equivalent? (I found a package but I don't think I understand how it works: http://www.web-port.net/Christfried.Webers/sources/flex/s-valrea__ads.htm) Input file: . . . vert 7 0.4453125 0.416015625 9 1 vert 8 0.453125 0.517578125 10 1 vert 9 0.39453125 0.513671875 11 1 . . . C code: . . . if (sscanf (buff, "%s %d ( %f %f %f ) ( %f %f %f )", joint->name, &joint->parent, &joint->pos(0), &joint->pos(1), &joint->pos(2), &joint->orient(0), &joint->orient(1), &joint->orient(2)) == 8){ . . .