| Paste number 91580: | format-monetary-value *example* |
| Pasted by: | adeht |
| When: | 9 months, 1 day ago |
| Share: | Tweet this! | http://paste.lisp.org/+1YNW |
| Channel: | #lisp |
| Paste contents: |
(cffi:defcfun ("strfmon" %strfmon) :int
(s :pointer)
(max-size :uint)
(format :string)
&rest)
(defmacro format-monetary-value (format-string &rest args)
`(cffi:with-foreign-pointer-as-string (output 128)
(%strfmon output 128 ,format-string
,@(loop for arg in args collect :double collect `(float ,arg 0.0d0)))))This paste has no annotations.