Bug 2731 – Errors in associative array example

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
phobos
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2009-03-12T10:58:00Z
Last change time
2014-04-18T09:13:12Z
Keywords
spec
Assigned to
bugzilla
Creator
gide

Comments

Comment #0 by gide — 2009-03-12T10:58:54Z
The associative array example given in the URL above fails to compile in D2, because the std.file.read expects an immutable file name, to fix change: int main (char[][] args) - to - int main (string[] args) Also, on line 60 has writef(... %8ld%8ld%8ld ... ), which are not valid formatting strings. writef(... %8d%8d%8d ... ) fixes the issue, this applies to D1 and D2. http://www.digitalmars.com/d/1.0/arrays.html#associative http://www.digitalmars.com/d/2.0/arrays.html#associative
Comment #1 by bugzilla — 2009-04-01T13:48:30Z
Fixed DMD 1.042 and 2.027