D - Bug: toString
- "Keir" <keir verizon.net> Feb 18 2003
- Michael Slater <mail effectivity.com> Feb 18 2003
- Burton Radons <loth users.sourceforge.net> Feb 18 2003
import c.stdio;
import string;
int main(char[][] args)
{
printf(toString(0));
return 0;
}
I would expect to see a zero when I run this...
instead I see "0123456789"
is anybody else having issues with this?
Feb 18 2003
Keir wrote:import c.stdio; import string; int main(char[][] args) { printf(toString(0)); return 0; } I would expect to see a zero when I run this... instead I see "0123456789" is anybody else having issues with this?
There seems to be something amiss -- import c.stdio; import string; int main(char[][] args) { int n = 5; puts(toString(n)); puts(toString(0)); puts(toString(n)); printf("%s\n", "past puts"); return 0; } 56789 0123456789 56789 Error: Access Violation --ms
Feb 18 2003
Keir wrote:import c.stdio; import string; int main(char[][] args) { printf(toString(0)); return 0; } I would expect to see a zero when I run this... instead I see "0123456789"
It's not returning a nul-terminated string. Using: printf (toStringz (toString (0))); Should format it correctly.
Feb 18 2003









Michael Slater <mail effectivity.com> 