D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3297 - readln example doesn't compile
Summary: readln example doesn't compile
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: Other All
: P2 normal
Assignee: Andrei Alexandrescu
URL: http://digitalmars.com/d/2.0/phobos/s...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-03 14:07 UTC by Jesse Phillips
Modified: 2015-06-09 01:28 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jesse Phillips 2009-09-03 14:07:52 UTC
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;

    }
Comment 1 Andrei Alexandrescu 2009-09-03 15:57:37 UTC
Coming with 2.033.