1. wait_key() in translated programs
- Posted by Juergen Luethje <j.lue at gmx.de> May 13, 2003
- 377 views
Hello all, the following program ------------------------- include get.e puts(1, "Hello world!\n\nPress any key ...") if wait_key() then end if ------------------------- runs as expected, using the Windows interpreter (2.4 Beta). That is, in order to terminate the program, I have to press any key 1 time. Using the translator (2.4 Beta), and the Borland C++ 5.5 Command-line Compiler, most keys also must be pressed 1 time, but unlike the interpreted program, <Enter> -- which I almost always use in such situations -- must be pressed 2 times. Strange ... Best regards, Juergen -- /"\ ASCII ribbon campain | |\ _,,,---,,_ \ / against HTML in | /,`.-'`' -. ;-;;,_ X e-mail and news, | |,4- ) )-,_..;\ ( `'-' / \ and unneeded MIME | '---''(_/--' `-'\_)
2. Re: wait_key() in translated programs
- Posted by Robert Craig <rds at RapidEuphoria.com> May 13, 2003
- 377 views
Juergen Luethje wrote: > the following program > > ------------------------- > include get.e > puts(1, "Hello world!\n\nPress any key ...") > if wait_key() then end if > ------------------------- > > runs as expected, using the Windows interpreter (2.4 Beta). > That is, in order to terminate the program, I have to press any key > 1 time. > > Using the translator (2.4 Beta), and the Borland C++ 5.5 Command-line > Compiler, most keys also must be pressed 1 time, but unlike the > interpreted program, <Enter> -- which I almost always use in such > situations -- must be pressed 2 times. Strange ... Yes, I'm aware of this little glitch. It only affects Windows console programs, translated using Borland or Lcc, not Windows GUI programs. It works fine translated with Watcom. I'm not sure what it is, but I've got it on my list. Thanks, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: wait_key() in translated programs
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> May 13, 2003
- 389 views
On Tue, 13 May 2003 17:59:02 -0400, Robert Craig <rds at RapidEuphoria.com> wrote: >Yes, I'm aware of this little glitch. >It only affects Windows console programs, >translated using Borland or Lcc, not Windows GUI programs. >It works fine translated with Watcom. >I'm not sure what it is, but I've got it on my list. A similar deal(?) is that if I leave the PC for a while and it goes into sleep mode, a "safe" thing to do to wake it up is press the shift key (plus it is the key nearest the door), but it don't work when a windows console has focus. Nudging the mouse works tho. Pete
4. Re: wait_key() in translated programs
- Posted by Juergen Luethje <j.lue at gmx.de> May 14, 2003
- 378 views
Hello Rob and Pete, Pete wrote: > On Tue, 13 May 2003 17:59:02 -0400, Robert Craig > <rds at RapidEuphoria.com> wrote: > >> Yes, I'm aware of this little glitch. >> It only affects Windows console programs, >> translated using Borland or Lcc, not Windows GUI programs. >> It works fine translated with Watcom. >> I'm not sure what it is, but I've got it on my list. Thanks. > A similar deal(?) is that if I leave the PC for a while and it goes > into sleep mode, a "safe" thing to do to wake it up is press the shift > key (plus it is the key nearest the door), but it don't work when a > windows console has focus. Nudging the mouse works tho. > > Pete AFAIK the <SHIFT> keys are special, compared to the normal character keys, whereas the <ENTER> key is a normal key sendig "character" #0D to the computer. No? Best regards, Juergen -- /"\ ASCII ribbon campain | |\ _,,,---,,_ \ / against HTML in | /,`.-'`' -. ;-;;,_ X e-mail and news, | |,4- ) )-,_..;\ ( `'-' / \ and unneeded MIME | '---''(_/--' `-'\_)
5. Re: wait_key() in translated programs
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> May 14, 2003
- 379 views
On Wed, 14 May 2003 12:45:44 +0200, Juergen Luethje <j.lue at gmx.de> wrote: >Hello Rob and Pete, > >Pete wrote: >> a "safe" thing to do to wake it up is press the shift >> key (plus it is the key nearest the door), but it don't work when a >> windows console has focus. Nudging the mouse works tho. >> >> Pete > >AFAIK the <SHIFT> keys are special, Correct and incorrect. Basic hardware is just going to say "this happened"; it is up to the PC/OS/software to determine it "special". Some API may register a shift key, or a mouse move, some may not. No big deal, just wanted Rob to bear that in mind if/when he looks at the problem just reported. I am entirely certain that the two are wholly, completely, and utterly unrelated, however if Rob is looking at the code written by a program that he wrote, it may (or probably more than likely not) relate back to the code He (not His program) wrote. Pete