From: Changying Li <lchangying@gmail.com>
To: guile-user@gnu.org
Subject: Re: why format procedure produce error?
Date: Thu, 12 Nov 2009 09:10:53 +0800 [thread overview]
Message-ID: <87aayszgwy.fsf@gmail.com> (raw)
In-Reply-To: 3ae3aa420911110820v68f47be2jfa742ee512a0bd56@mail.gmail.com
I can't agree you more...
Linas Vepstas <linasvepstas@gmail.com> writes:
> 2009/11/11 Changying Li <lchangying@gmail.com>:
>> 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 ?
>
>
> That would be my guess. I assume that once upon a time,
> an integer was interpreted as a file or socket number, but
> that this code was later disabled, and the documentation
> was not changed. I guess that supporting fileno would have
> made an mswindows version difficult -- besides, raw fileno
> numbers are kind of a bad idea in this day and age.
>
> --linas
>
>
>
--
Thanks & Regards
Changying Li
next prev parent reply other threads:[~2009-11-12 1:10 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 [this message]
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=87aayszgwy.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).