[beginner] Why nothing is printed to stdout ?
Dmitry Olshansky
dmitry.olsh at gmail.com
Sun Oct 30 13:55:58 PDT 2011
On 30.10.2011 14:00, Frédéric Galusik wrote:
> 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
>
I might be way off on this.
Yet this silly stuff used to catch me all the time when switching from
windows to *nixes, back and forth:
sh$: compile something to 'test'
sh$: test
no output - WTF? Ahem, it just called that command line tool named test...
sh$: ./test
wow, now something happens ;)
--
Dmitry Olshansky
More information about the Digitalmars-d-learn
mailing list