digitalmars.D.bugs - [Issue 10033] New: Wrong example in chapter Vector Extensions
- d-bugmail puremagic.com (24/24) May 05 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10033
http://d.puremagic.com/issues/show_bug.cgi?id=10033 Summary: Wrong example in chapter Vector Extensions Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nobody puremagic.com ReportedBy: kai redstar.de In the Language Reference, chapter Vector Extensions, section Accessing Individual Vector Elements: The 3rd example cast(int[4])v[3] = 2; does not compile. You have to add parenthesis to compile: (cast(int[4])v)[3] = 2; (According to TDPL, [] has a higher precedence then cast(). The compile error is therefore correct.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 05 2013