unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Changying Li <lchangying@gmail.com>
To: guile-user@gnu.org
Subject: why format procedure produce error?
Date: Wed, 11 Nov 2009 19:45:49 +0800	[thread overview]
Message-ID: <87my2tz3ma.fsf@gmail.com> (raw)

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)


it work when I use (format (current-error-port) "hello")

Is there something wrong in the guile manual ?


-- 

Thanks & Regards

Changying Li





             reply	other threads:[~2009-11-11 11:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 11:45 Changying Li [this message]
2009-11-11 16:20 ` why format procedure produce error? Linas Vepstas
2009-11-12  1:10   ` Changying Li
2010-08-28 20:45     ` Andy Wingo
2009-11-14 14:18 ` Neil Jerram

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=87my2tz3ma.fsf@gmail.com \
    --to=lchangying@gmail.com \
    --cc=guile-user@gnu.org \
    /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).