www.digitalmars.com         C & C++   DMDScript  

D - newbie question

reply Gerd Schering <Gerd_member pathlink.com> writes:
Hello,

I wrote the following little program, just to get aquainted with D:

void
main ()
{

char[] dirname = "Newdir";

mkdir(dirname);
}

The programm compliles without error, but when I run it, it says:

Error: Newdir: 0

The directory get's created. Any hint?

Gerd
Dec 13 2003
next sibling parent "Andrew Edwards" <edwardsac spamfreeusa.com> writes:
"Gerd Schering" <Gerd_member pathlink.com> wrote in message
news:brg0jk$2ifc$1 digitaldaemon.com...
 Hello,

 I wrote the following little program, just to get aquainted with D:

 void
 main ()
 {

 char[] dirname = "Newdir";

 mkdir(dirname);
 }

 The programm compliles without error, but when I run it, it says:

 Error: Newdir: 0

 The directory get's created. Any hint?

 Gerd
What system are you using? This works just fine on WinXP Pro.
Dec 14 2003
prev sibling parent reply Ant <Ant_member pathlink.com> writes:
In article <brg0jk$2ifc$1 digitaldaemon.com>, Gerd Schering says...
Hello,

I wrote the following little program, just to get aquainted with D:

void
main ()
{

char[] dirname = "Newdir";

mkdir(dirname);
}

The programm compliles without error, but when I run it, it says:

Error: Newdir: 0

The directory get's created. Any hint?

Gerd
I that the linux version? Some file functions on the linux version throw an error when the system call returns normally, because they check for the wrong return code. seems create dir is one of those. (this error was reported before) You could wait for the next release or just go there an correct you local version of phobos. look for a bug report I posted on this news group. Ant
Dec 14 2003
parent reply Gerd Schering <Gerd_member pathlink.com> writes:
In article <bri06v$2ca0$1 digitaldaemon.com>, Ant says...

[...]
The programm compliles without error, but when I run it, it says:

Error: Newdir: 0

The directory get's created. Any hint?
I that the linux version?

Some file functions on the linux version throw an error when the
system call returns normally, because they check for the wrong
return code. seems create dir is one of those.
Well, it is the linux version....
Dec 15 2003
parent "Walter" <walter digitalmars.com> writes:
"Gerd Schering" <Gerd_member pathlink.com> wrote in message
news:brkbqs$2p8m$1 digitaldaemon.com...
 Well, it is the linux version....
It's a known bug, and it'll get fixed in the next update. -Walter
Dec 18 2003