For Programmers: Free Programming Magazines  


Home > Archive > Dylan > September 2005 > format-string error?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author format-string error?
Stefan Rupp

2005-08-31, 9:56 pm

Hi all,

I've been playing around with d2c now for a while, and discovered the
following issue:
The output of
format-out("%04d\n", 9);
is not "0009" as I had expected, but " 9" (three spaces and then '9').
According to the DRM "these format directives are designed for
compatibility with C's printf, with some omissions and with the addition
of %=."
( https://gauss.gwydiondylan.org/book...ml#MARKER-2-953 )
The DRM isn't more specific concerning this topic.
Is this a intentional omission, just not working at the moment, or is it
me that made something wrong?

Thank You,
Stefan
Peter S. Housel

2005-09-01, 6:57 pm

Stefan Rupp <mail.struppi@web.de> writes:

> I've been playing around with d2c now for a while, and discovered the
> following issue:
> The output of
> format-out("%04d\n", 9);
> is not "0009" as I had expected, but " 9" (three spaces and then '9').
>...
> Is this a intentional omission, just not working at the moment, or is it
> me that made something wrong?


It's something that's just not working at the moment. I temporarily
stopped work on that before implementing zero-fill, since it was
slightly tricky given the surrounding code, and since nobody needed it
at the time. Follow

http://www.gwydiondylan.org/bugs/show_bug.cgi?id=7122

to track progress on this issue.

-Peter-
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com