[beginner] Why nothing is printed to stdout ?

Mike James foo at bar.com
Sun Oct 30 13:48:16 PDT 2011


"Nick Sabalausky" <a at a.a> wrote in message 
news:j8kd11$25v1$1 at digitalmars.com...
> "Frédéric Galusik" <fredg at salixosnospam.org> wrote in message 
> news:j8j77l$pfv$1 at digitalmars.com...
>> Hi,
>>
>> Can someone give me a clue on why nothing is printed to stdout ?
>>
>> I wish a list of files with their size.
>>
>> code:
>> //
>> import std.stdio;
>> import std.file;
>>
>> void main(string[] args)
>> {
>>    foreach (DirEntry e; dirEntries(".", SpanMode.shallow))
>>    {
>>        writeln(e.name, "\t", e.size);
>>    }
>> }
>> //
>> Build with (dmd2):
>> dmd -w test.d
>>
>
> My aplogies it you already know this, It's not my intention to be 
> patronizing: You did run the resulting executable, right ( ./test )? And 
> there are files in the dir its beng run from?
>
>

And you did run it in a DOS window or from a batch file with a PAUSE to 
allow you to read the output ;-)




More information about the Digitalmars-d-learn mailing list