chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] format-modular usage question


From: Joshua Griffith
Subject: Re: [Chicken-users] format-modular usage question
Date: Mon, 30 Jul 2007 12:57:44 -0500

Kon,

My apologies, I missed that in the doc.  I'll open a TRAC ticket.

Thanks,

Joshua

On 7/30/07, Kon Lovett < address@hidden> wrote:

On Jul 30, 2007, at 10:23 AM, Joshua Griffith wrote:

> Hello,
>
> I'm trying to use format to create a string consisting of the cars
> of a list of lists delimited by commas and enclosed by
> parentheses.  I tried the following statement:
> (format #f "(~:{~a~:^, ~})" '((prop1 val1) (prop2 val2) (prop3 val3)))

Umm, according to the "format-modular" doc, '~:^' is not implemented.
Sorry.

Out of the unimplemented feature set this is probably the next one
that should be done. Will you open a TRAC ticket please.

Kon

>
> But it returns:
> "(prop1, prop2, prop3, )"
>
> However, I'm trying to get:
> "(prop1, prop2, prop3)"
>
> It seems that ~:^ is not escaping on the last element, causing the
> last comma and space to be emitted.  Does anyone know how to modify
> the format statement to eliminate the last comma and space?  I know
> that I could just map car and format the result, but I'm trying to
> learn more about format.
>
> Thanks,
>
> Joshua
>
>
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users



reply via email to

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