[Bug 240] New: i++ not working correctly as arg to writeln

via D.gnu d.gnu at puremagic.com
Sat Sep 17 02:36:40 PDT 2016


http://bugzilla.gdcproject.org/show_bug.cgi?id=240

            Bug ID: 240
           Summary: i++ not working correctly as arg to writeln
           Product: GDC
           Version: 5.x
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gdc
          Assignee: ibuclaw at gdcproject.org
          Reporter: alex at sunopti.com

import std.stdio;
void main()
{
        int i = 0;
        writefln("result = %s,%s",i,i++);
}

result = 1,0

The expected result and that produced by the online compiler at dlang.org is
result = 0,0.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the D.gnu mailing list