Guest User

Untitled

a guest
Jul 19th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.36 KB | None | 0 0
  1. import std.stdio;
  2. import std.file;
  3.  
  4. void main()
  5. {
  6.     DirIterator entries = dirEntries("D:\\Video", SpanMode.breadth);
  7.  
  8.     string s;
  9.  
  10.     foreach(int i; [0,1,2])
  11.     {
  12.                 writeln("-------");
  13.         s = "hello";
  14.  
  15.         foreach(DirEntry e; entries)
  16.         {
  17.             writeln("this gets printed");
  18.             s ~= "can you see me?";
  19.         }
  20.     }
  21.  
  22.     writeln(s); // prints "hello"
  23. }
Add Comment
Please, Sign In to add comment