Hi, all.
I've been enjoying great success with GPC since Maurice and others helped me get the graphics going.
I'm now hung up on a little side issue. In TP and BP, there was a useful Boolean function "keypressed". This let you do things like:
begin massive loop if keypressed then begin ch := readkey; [ process keystroke here] end; [do the rest of the massive loop here] end;
I can drag in "getch" from C to do the readkey, but I don't know how to do a "keypressed" function. So now I either have to wait for keystrokes at each pass through the loop, or take the getch completely out of the loop.
Surely someone in the group knows how to do this, either with a (undocumented) GPC function, or by dragging in some other obscure C function!
Toby Ewing ewing@iastate.edu 515/294-7856 http://www.agron.iastate.edu/soilphysics/ewing.html Soil Scientist, Iowa State University
I've been enjoying great success with GPC since Maurice and others helped me get the graphics going.
GRX? If so, your `KeyPressed' problem can easily be solved; see the `MouseEvent'-related functions of GRX. (Although they are named `MouseEvent', they cover the keyboard as well and in a more flexible way than `KeyPressed' and `ReadKey' do.)
I'm now hung up on a little side issue. In TP and BP, there was a useful Boolean function "keypressed". This let you do things like: [...]
The next (beta) release of GPC (scheduled for ... er ... last week #-) will come with a portable standard unit that will cover this. (Many thanks to Frank and The African Chief.:-)
Peter