fork download
  1. import std.stdio;
  2.  
  3. void main()
  4. {
  5. auto x = [ "test", "some lines", "out"];
  6. foreach(int i, string line; x)
  7. writefln("%d: %s", i, line);
  8. }
Success #stdin #stdout 0.01s 2120KB
stdin
Standard input is empty
stdout
0: test
1: some lines
2: out