Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
January 07, 2002 (void) | ||||
---|---|---|---|---|
| ||||
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 Re: (void) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pavel Minayev | As you might have guessed, simple search-and-replace of (void) to () solves the problem. |
January 07, 2002 Re: (void) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pavel Minayev | "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 Re: (void) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "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 Re: (void) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pavel Minayev | "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>. |
Copyright © 1999-2021 by the D Language Foundation