unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
Cc: Guile Mailing List <guile-user@gnu.org>
Subject: Re: add printf.scm to ice-9?
Date: Mon, 08 Apr 2002 22:05:37 -0600	[thread overview]
Message-ID: <3CB26891.3060201@bothner.com> (raw)
In-Reply-To: Pine.LNX.4.21.0204082213290.6782-100000@ariel.lan.telltronics.org

Steve Tell wrote:
>>#|kawa:1|# (format "[~12,5e]" (sqrt 2))
>>[  1.41421E+0]
> 
> In guile, that's  (format #f "[~12,5e]" (sqrt 2))

Kawa allows the #f (or more generally the "destination"
specification) to be omitted.  I believe this was to
be compatible with some other Scheme  implementations.
It certainly is needed for compatibility with SRFI-28,
which implies "many Scheme implementations" have a format
function that does not require the #f.

> I've wondered how one would translate somthing like 
> 	(let ((w 12)(d 5)) (printf "%*,*e" w d (sqrt 2)))
> though.
> 
> But how terrible would it really be to provide both format and printf? 

Not terrible at all.  In fact slib (and Kawa) provide both.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2002-04-09  4:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-07 16:09 add printf.scm to ice-9? Matthew R Wette
2002-04-07 20:30 ` Per Bothner
2002-04-09  2:43   ` Steve Tell
2002-04-09  4:05     ` Per Bothner [this message]
2002-04-28 15:10     ` Marius Vollmer
2002-04-07 23:53 ` Marius Vollmer
2002-04-14 19:32   ` Rob Browning
  -- strict thread matches above, loose matches on Subject: below --
2002-04-06 22:00 Matthew R Wette
2002-04-07 10:42 ` Marius Vollmer
2002-04-07 14:38 ` 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=3CB26891.3060201@bothner.com \
    --to=per@bothner.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).