small mistake in http://www.digitalmars.com/d/ctod.html
smjg_1998 at yahoo.com
Sun Oct 22 14:11:41 PDT 2006
Lionello Lunesu wrote:
> under the heading "Formatted printing".
> Apart from the fact that the D code uses printf (running gag), is uses
> "import stdio;" which should probably be "import std.c.stdio;" ? It also
> would be a great place to mention the %.*s trick and writefln, I think.
The D way shouldn't mention printf at all. It should just use
writef(ln). That way, it would be consistent with other examples. Some
of them give an example in C that happens to work in D as well. But the
whole point is to show how it can done more nicely in D, and so they
don't repeat the C solution when giving the D solution.
-----BEGIN GEEK CODE BLOCK-----
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
More information about the Digitalmars-d-bugs