[Issue 11782] format pointer to range prints range
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 19 14:09:08 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11782
--- Comment #2 from monarchdodra at gmail.com 2013-12-19 14:09:07 PST ---
(In reply to comment #1)
> (In reply to comment #0)
>
> > This is not documented behavior. The documented behavior is simply:
> > "Pointers are formatted as hex integers."
>
> The fun is that a pointer to a range is a range. It naturally supports all of
> primitives.
Almost ;)
https://d.puremagic.com/issues/show_bug.cgi?id=11779
//----
import std.string;
void main()
{
auto a = iota(0, 10).array();
auto p = &a;
writefln("%s", a);
writefln("%s", p);
}
//----
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
7FFF0ABA5FA0
//----
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list