Source position: mnSynHighlighterD.pas line 66
const cDSample = 'import std.stdio;'#13#10 + '// Computes average line length for standard input.'#13#10 + ''#13#10 + 'void main()'#13#10 + '{'#13#10 + ' ulong lines = 0;'#13#10 + ' double sumLength = 0;'#13#10 + ' foreach (line; stdin.byLine())'#13#10 + ' {'#13#10 + ' ++lines;'#13#10 + ' sumLength += line.length;'#13#10 + ' }'#13#10 + ' writeln("Average line length: ",'#13#10 + ' lines ? sumLength / lines : 0);'#13#10 + '}'#13#10; |
CT Web help |
CodeTyphon Studio |