www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4461] New: iota completely broken when using negative integers

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: dsimcha yahoo.com



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: -------
Jul 14 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4461


kennytm gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kennytm gmail.com



Cannot reproduce on Phobos r1824. I think it is fixed already.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 09 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4461


David Simcha <dsimcha yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



You're right.  Iota was revamped for 2.048 and this apparently got fixed.

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