August 30 [Issue 24732] New: FAQ article is out of date on calling printf | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24732 Issue ID: 24732 Summary: FAQ article is out of date on calling printf Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor Priority: P1 Component: dlang.org Assignee: nobody@puremagic.com Reporter: nick@geany.org https://dlang.org/articles/faq.html#printf "Attempting this in D, as in: string s; s = "foo"; printf("string = '%s'\n", s); usually results in garbage being printed, or an access violation" Passing an array as a C variadic parameter is a compile-time error. > In D, strings are not 0 terminated The FAQ should also mention that string literals are 0-terminated. PR incoming. -- |
Copyright © 1999-2021 by the D Language Foundation