[Issue 3297] New: readln example doesn't compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 3 14:07:53 PDT 2009


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

           Summary: readln example doesn't compile
           Product: D
           Version: 2.031
          Platform: Other
               URL: http://digitalmars.com/d/2.0/phobos/std_stdio.html#rea
                    dln
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: nobody at puremagic.com
        ReportedBy: Jesse.K.Phillips+D at gmail.com
                CC: Jesse.K.Phillips+D at gmail.com


The example code for std.stdio.readln does not compile. By changing
'readln(stdin...' to 'stdin.readln(...' the code below compiles:

    import std.stdio;

    void main() {
      char[] buf;
      while (stdin.readln(buf))
         write(buf);
      return 0;

    }

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