2731 – Errors in associative array example

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2731 - Errors in associative array example
Summary: Errors in associative array example
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D1 (retired)
Hardware: All All
: P3 minor
Assignee: Walter Bright
URL: http://www.digitalmars.com/d/2.0/arra...
Keywords: spec
Depends on:
Blocks:
Reported: 2009年03月12日 10:58 UTC by Gide Nwawudu
Modified: 2014年04月18日 09:13 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Gide Nwawudu 2009年03月12日 10:58:54 UTC
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 Walter Bright 2009年04月01日 13:48:30 UTC
Fixed DMD 1.042 and 2.027


AltStyle によって変換されたページ (->オリジナル) /