comp.lang.ada
 help / color / mirror / Atom feed
* Does ada have a sscanf equivalent?
@ 2010-02-22  9:08 J.s
  2010-02-22 10:24 ` Georg Bauhaus
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: J.s @ 2010-02-22  9:08 UTC (permalink / raw)


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){
        . . .



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-02-23 21:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-22  9:08 Does ada have a sscanf equivalent? J.s
2010-02-22 10:24 ` Georg Bauhaus
2010-02-22 10:42 ` Jacob Sparre Andersen
2010-02-22 15:38   ` J.s
2010-02-22 19:48 ` jpwoodruff
2010-02-22 23:11   ` Jerry
2010-02-23  2:11     ` jpwoodruff
2010-02-23  9:36       ` Conversion from Ada95 to Ada05 (Was: Does ada have a sscanf equivalent?) stefan-lucks
2010-02-23 19:48         ` Randy Brukardt
2010-02-23 21:12           ` Conversion from Ada95 to Ada05 Robert A Duff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox