On Saturday 01 September 2007, DJ Delorie wrote: > Hmm^2... teach pcb's parser to support a unit suffix on each > value! We only need mil and mm, but the mechanism should > allow for more as needed.
I have code to do that in gnucap. It's C++, but it is just one function, and trivial to convert to C. If you go back to version 0.16, (1994) there is a pure C version. It is essentially the same. > It won't *save* that way, I have code for that too. Again, go back to 0.16 for a pure C version. For PCB it probably isn't worth it. For gnucap, printing numbers that way in a data table helps readability a lot. You can turn the letters off, then it still prints with exponents in powers of 3. This way, anything can read it, and it still is easier to read than traditional scientific notation. The licensing is officially GPL. If someone wants to use it (these functions) in a non-GPL program, I don't care. If you want to consider it "public domain" that's ok. One warning about them .. The units are SPICE style, not SI style. There are subtle differences. You said you want "mil". That means you want SPICE style. Printing uses a subset of the units that is compatible with both SPICE and SI style. _______________________________________________ geda-user mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

