From: Neil Jerram <neil@ossau.uklinux.net>
To: lchangying@gmail.com
Cc: guile-user@gnu.org
Subject: Re: why format procedure produce error?
Date: Sat, 14 Nov 2009 14:18:11 +0000 [thread overview]
Message-ID: <87d43l197g.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87my2tz3ma.fsf@gmail.com> (Changying Li's message of "Wed, 11 Nov 2009 19:45:49 +0800")
Changying Li <lchangying@gmail.com> writes:
> in the guile manual:
> -- Scheme Procedure: format dest fmt [args...]
> Write output specified by the FMT string to DEST. DEST can be an
> output port, `#t' for `current-output-port' (*note Default
> Ports::), a number for `current-error-port', or `#f' to return the
> output as a string.
>
> what's the meaning of NUMBER?
> I want to write things to error port, so I write
> (format 1 "hello")
>
> standard input:5:1: In procedure simple-format in expression (format 1 "hello"):
> standard input:5:1: Wrong type argument in position 1: 1
> ABORT: (wrong-type-arg)
You need to add (use-modules (ice-9 format)) to your code, to get the
full implementation of `format'. Then the "number means
current-error-port" thing should work.
At the moment, you're actually using `simple-format'.
> Is there something wrong in the guile manual ?
I don't think so, because the documentation that you cited comes from a
section that begins by saying that
"This function is available from
(use-modules (ice-9 format))"
Regards,
Neil
prev parent reply other threads:[~2009-11-14 14:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 11:45 why format procedure produce error? Changying Li
2009-11-11 16:20 ` Linas Vepstas
2009-11-12 1:10 ` Changying Li
2010-08-28 20:45 ` Andy Wingo
2009-11-14 14:18 ` Neil Jerram [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d43l197g.fsf@ossau.uklinux.net \
--to=neil@ossau.uklinux.net \
--cc=guile-user@gnu.org \
--cc=lchangying@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).