[Issue 4461] New: iota completely broken when using negative integers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 14 12:25:09 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4461

           Summary: iota completely broken when using negative integers
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: dsimcha at yahoo.com


--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2010-07-14 12:25:08 PDT ---
Test Case:

import std.range, std.array, std.stdio;

void main() {
    writeln(array(iota(-5, 5)));      // FAIL
    writeln(array(iota(-5, 5, 1)));   // FAIL
    writeln(array(iota(-5.0, 5.0)));  // Works.
}


Output:  
4294967291 4294967292 4294967293 4294967294 4294967295 0 1 2 3 4
4294967291 4294967292 4294967293 4294967294 4294967295 0 1 2 3 4
-5 -4 -3 -2 -1 0 1 2 3 4

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list