Thread overview
(void)
Jan 07, 2002
Pavel Minayev
Jan 07, 2002
Pavel Minayev
Jan 07, 2002
Walter
Jan 07, 2002
Pavel Minayev
Jan 07, 2002
Walter
January 07, 2002
There is a problem with functions (mostly C ones) which
have their parameter list declared as (void) - lots
of such declarations are in stdio.d. D doesn't complain
about prototypes, but when it's time to call the function,
it gives an "argument mismatch" error. Just try to call
getch() or kbhit(), you'll see what I mean.


January 07, 2002
As you might have guessed, simple search-and-replace
of (void) to () solves the problem.


January 07, 2002
"Pavel Minayev" <evilone@omen.ru> wrote in message news:a1caov$14ra$1@digitaldaemon.com...
> As you might have guessed, simple search-and-replace
> of (void) to () solves the problem.

D should issue an error message about trying to use void as a parameter type!


January 07, 2002
"Walter" <walter@digitalmars.com> wrote in message news:a1d0bt$1ich$1@digitaldaemon.com...
>
> "Pavel Minayev" <evilone@omen.ru> wrote in message news:a1caov$14ra$1@digitaldaemon.com...
> > As you might have guessed, simple search-and-replace
> > of (void) to () solves the problem.
>
> D should issue an error message about trying to use void as a parameter type!

Well it doesn't. At least in stdio.d. And so it was when
I translated winsock and opengl...


January 07, 2002
"Pavel Minayev" <evilone@omen.ru> wrote in message news:a1d0nu$1if1$1@digitaldaemon.com...
> "Walter" <walter@digitalmars.com> wrote in message news:a1d0bt$1ich$1@digitaldaemon.com...
> >
> > "Pavel Minayev" <evilone@omen.ru> wrote in message news:a1caov$14ra$1@digitaldaemon.com...
> > > As you might have guessed, simple search-and-replace
> > > of (void) to () solves the problem.
> >
> > D should issue an error message about trying to use void as a parameter type!
>
> Well it doesn't. At least in stdio.d. And so it was when
> I translated winsock and opengl...

It will <g>.