From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Changying Li Newsgroups: gmane.lisp.guile.user Subject: Re: why format procedure produce error? Date: Thu, 12 Nov 2009 09:10:53 +0800 Message-ID: <87aayszgwy.fsf@gmail.com> References: <87my2tz3ma.fsf@gmail.com> <3ae3aa420911110820v68f47be2jfa742ee512a0bd56@mail.gmail.com> Reply-To: lchangying@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1257988564 18127 80.91.229.12 (12 Nov 2009 01:16:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Nov 2009 01:16:04 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Nov 12 02:15:57 2009 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N8OI0-0005Qu-Jn for guile-user@m.gmane.org; Thu, 12 Nov 2009 02:15:56 +0100 Original-Received: from localhost ([127.0.0.1]:56825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8OI0-0002hk-31 for guile-user@m.gmane.org; Wed, 11 Nov 2009 20:15:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8OHi-0002cV-Ps for guile-user@gnu.org; Wed, 11 Nov 2009 20:15:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8OHd-0002bc-O6 for guile-user@gnu.org; Wed, 11 Nov 2009 20:15:37 -0500 Original-Received: from [199.232.76.173] (port=51949 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8OHd-0002bZ-Hf for guile-user@gnu.org; Wed, 11 Nov 2009 20:15:33 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:36425) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N8OHd-00071Y-7R for guile-user@gnu.org; Wed, 11 Nov 2009 20:15:33 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1N8OHa-0005HU-QN for guile-user@gnu.org; Thu, 12 Nov 2009 02:15:30 +0100 Original-Received: from 60.211.211.146 ([60.211.211.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Nov 2009 02:15:30 +0100 Original-Received: from lchangying by 60.211.211.146 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Nov 2009 02:15:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 44 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 60.211.211.146 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:rFrQafIrbxiuZfWDrR45j7WHiR0= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:7477 Archived-At: I can't agree you more... Linas Vepstas writes: > 2009/11/11 Changying Li : >> 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