[Issue 4171] New: std.random.uniform does not work for a range of characters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 10 10:45:36 PDT 2010


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

           Summary: std.random.uniform does not work for a range of
                    characters
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: pelle.mansson at gmail.com


--- Comment #0 from Pelle Månsson <pelle.mansson at gmail.com> 2010-05-10 10:45:34 PDT ---
import std.random;

void main() {
    uniform('a', 'z');
}

results in

phobos/std/random.d(659): Error: cannot implicitly convert expression
(cast(int)b - 1) of type int to char

-- 
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