Thread overview | |||||
---|---|---|---|---|---|
|
January 09, 2002 getch () | ||||
---|---|---|---|---|
| ||||
Two questions: 1) When I try to hold a dos box open with 'getch ();' I get the error message 'E"\dmd\src\phobos\stdio.d(142) getch function parameters do not match argument types ()' I must be doing something stupid?. 2)) Is there any reason D can't have a getch() that does what it says, as opposed to 'get_first_char_of_line()' ? It can be done, and part of the rationale for D is to correct C's flaws. Karl Bochert |
January 09, 2002 Re: getch () | ||||
---|---|---|---|---|
| ||||
Posted in reply to Karl Bochert | Actually, D doesn't have a getch(). It just calls the C one directly. Are you passing an argument to getch()? "Karl Bochert" <kbochert@ix.netcom.com> wrote in message news:1103_1010544653@bose... > Two questions: > 1) When I try to hold a dos box open with 'getch ();' I get the error > message 'E"\dmd\src\phobos\stdio.d(142) getch function parameters do not match argument types ()' > I must be doing something stupid?. > > 2)) Is there any reason D can't have a getch() that does what it says, as opposed to > 'get_first_char_of_line()' ? It can be done, and part of the rationale for D is to > correct C's flaws. > > Karl Bochert > > |
January 09, 2002 Re: getch () | ||||
---|---|---|---|---|
| ||||
Posted in reply to Karl Bochert | "Karl Bochert" <kbochert@ix.netcom.com> wrote in message news:1103_1010544653@bose... > Two questions: > 1) When I try to hold a dos box open with 'getch ();' I get the error > message 'E"\dmd\src\phobos\stdio.d(142) getch function parameters do not match argument types ()' > I must be doing something stupid?. Open stdio.d. Do a searh-n-replace: "(void)" => "()". Now it should work. > 2)) Is there any reason D can't have a getch() that does what it says, as opposed to > 'get_first_char_of_line()' ? It can be done, and part of the rationale for D is to > correct C's flaws. getch() is not a D function, but a C one. It's just one another advantage of D that it links to C libraries and borrows quite a lot of functions from there, giving us a common set to work with. The native D library is just not fully implemented yet. |
Copyright © 1999-2021 by the D Language Foundation