writing

spir denis.spir at gmail.com
Thu Oct 14 00:58:36 PDT 2010


Hello,

write and writeln just write; writef and writefln first format: seems clear. But the latter do not work properly with D strings, and the former do not work without format. Is there a practical way to just write anything to the terminal (without caring of its type)?

Is there some rationale about this?
Would it be possible to automatically add \0 to D strings passed to write/writeln (can a programmer define a custom func doing this before delegating to builtin funcs, or is it necessarily a job for the compiler?)?
And/or what about having writef/writefln use "%s" as default format (when the first arg is not a string)?

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d-learn mailing list