Path: utzoo!mnetor!tmsoft!masnet!canremote!edwin.milne From: edwin.milne@canremote.uucp (EDWIN MILNE) Newsgroups: comp.databases Subject: Re: dBase/FoxBase question Message-ID: <89080709105201@masnet.uucp> Date: 6 Aug 89 15:35:00 GMT Organization: Canada Remote Systems Limited, Mississauga, ON, Canada Lines: 26 >How does one detect the keypress of a control character in dBase. >(Actual enviro is FoxBase under SCO) tp>use the inkey() function. I've used something along the following tp>for the applications I do when I want a character without making the tp>user hit CR. tp>i = 0 tp>do while i = 0 tp> i = inkey() tp>enddo This may work fine under DOS where the CPU has nothing better to do than continually poll the keyboard, but in a Xenix environment, you have just created a totally process bound program which may degrade the performance for every other user on the system. Much better with Foxbase under either Xenix or DOS is i = inkey(0) The '0' tells Foxbase to wait for the next character to be typed. Under Xenix, Foxbase would stop using the CPU until Xenix got the interrupt caused by the operator pressing the key. --- * QDeLuxe 1.00 #606