chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Re: Bug in format: can't iterate over 100 values?


From: felix winkelmann
Subject: [Chicken-users] Re: Bug in format: can't iterate over 100 values?
Date: Mon, 1 Aug 2005 11:39:58 +0200

On 7/31/05, Alejandro Forero Cuervo <address@hidden> wrote:
> Hi.
> 
> I just thought I'd report a bug in format that has bit me recently.
> It is very easy to reproduce:
> 
>   (use srfi-1 format)
>   (format #f "~{ ~A~}" (iota 200))
> 
> Notice that the returned string includes the numbers from 0 to 99, not
> to 200! :/

Look at this: 

format.scm:706:          (else (if (not max-iterations) (set! max-iterations 
100))))

Very strange. We should probably increase this a little. What the author
intended can only be guessed at...

> 
> BTW, I have a slightly incomplete implementation of format.  If anyone
> cares to help me finish it, we could replace the implementation in
> Chicken.  It already supports the following escape sequences (with all
> their optional arguments/colon/at): ~A ~S ~/ ~X ~D ~O ~B ~% ~( ~) ~[
> ~; ~] ~? ~* ~P ~{ ~} ~^.  It has two important advantages over
> Chicken's implementation: it is reentrant (thus can be safely used
> with threads or building streams of characters using a custom port)
> and is modular (allowing the caller to define new escape sequences).
> If anyone is interested, this is available at:
> 
>   http://anonymous:@svn.afc.no-ip.info/svn/home/src/chicken-eggs/format/
> 

Replacing that dreaded format unit would be very nice, but any replacement
should provide the same (or at least roughly the same) functionality.
How much is currently missing? If it's not too much, I'd happly replace
the current version.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]