With unified diff.
Liam
On Thu, May 28, 2009 at 10:51 PM, Liam Healy lnp@healy.washington.dc.us wrote:
Never mind my previous patch, this one is better.
Previously, in order to read double floats, I reset *read-default-float-format*, but that makes global changes, sometimes undesirable. So instead, in this version, if the format is specified as "D", it will create a number that Lisp will read as double float. Otherwise the :format argument should be NIL or a C format string ("D" is unused in C).
So for example (constant (+mksa-plancks-constant-h+ GSL_CONST_MKSA_PLANCKS_CONSTANT_H) :format "D") becomes (cl:defconstant +mksa-plancks-constant-h+ 6.626069d-34)
If the :format argument is not given or is nil, the expansion of constant should be identical to the original.
Liam