[CM] format output to file port fails

Gregg Reynolds dev at mobileink.com
Sat Oct 9 06:00:00 PDT 2021


(let ((opts (stanza-opts stanza)) ;; function returns '(-safe-string)
      (opts2 '(-safe-string)))
    (format #t "OPTS: ~A :: ~A" (type-of opts) opts) (newline)
    (format #t "OPTS2: ~A :: ~A" (type-of opts2) opts2) (newline)
    (for-each (lambda (opt)
                (format outp "    \"~A\",\n" opt) ;; outp => file
                (format #t "    \"~A\",\n" opt)
                )
              opts)
    ...)

Stdout:

OPTS: pair? :: (-safe-string)
OPTS2: pair? :: (-safe-string)
    "-safe-string",

File output for for-each over opts2 is "-safe-string", as expected.  But
there is no file output for for-each over opts.

No idea what's going on. Is this a bug, or am I doing something wrong?

Thanks

Gregg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20211009/7b2976e9/attachment.html>


More information about the Cmdist mailing list