Makes some sense, althugh I'm not convinced that a %q specifier in sscanf is the way to go. It's not obvious exactly what it should match. Some formats that it might support:
17 5/7 -5/7 5/-7 4.711 4711e-3 3.14e-4711 5e3/7 5/7e3
/ Niels Möller (vässar rödpennan)
Previous text:
2004-02-07 15:31: Subject: sscanf and Gmp.mpq
I'm going to do simplification on input data such as finding uselessly verbose ways of drawing a straight line between A and B; for instance, via a point C between the two. Otherwise, strings would of course be quite satisfactory.
And while floating point precision would probably be just fine for the majority of users, better support for the Gmp primitives in Pike wouldn't hurt. AFAIK only Gmp.mpz is exercised regularly and to any greater extent in Pike today, making it less than convenitnt to use the others. Call it more of a reason to make the work more compelling.
/ Johan Sundström (Achtung Liebe!)