D - Bug: toString
- Keir (10/10) Feb 18 2003 import c.stdio;
- Michael Slater (18/32) Feb 18 2003 There seems to be something amiss --
- Burton Radons (4/15) Feb 18 2003 It's not returning a nul-terminated string. Using:
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