RE: Get Key Function?
- From: meek@xxxxxxxxxxxxxxx
- Date: 1 MAY 09 13:00:47 GMT
In a previous article, Jason Blevins <jrblevin@xxxxxxxxxxxxxxxx> wrote:
On May 1, 2009, at 12:41 PM, Jason Blevins wrote:
On May 1, 2009, at 10:51 AM, nuclear wingnut wrote:
I've been searching around the message board for information on a "Get
Key" function for Fortran - the ability to have a program read input
from a keyboard without having to push enter - and I've found a few
posts that explain the difficulty of this. However, the posts I could
find were at least a decade old, some older than that.
(snip)
If you don't mind using something non-standard, I know that
GFortran has an FGET extension for this. It's likely that
G95 has a similar extension.
My mistake. I just realized that FGET doesn't quite do what
you want. It just reads in stream mode, it won't get the
input for you immediately after a key press.
Jason
What I do in WATCOM FOrtran 77 (www.openwatcom.org)
is have a little "pragma" (short assembler program embedded
in the source) which looks at the keyboard strobe and gets
the keycode if there was a strobe. If it's a key I don't want,
I clear the strobe and return "no key".
But other fortrans don't have this ability. Too bad.
Chris
.
- References:
- Get Key Function?
- From: nuclear . wingnut
- Re: Get Key Function?
- From: Jason Blevins
- Get Key Function?
- Prev by Date: Re: Floating point
- Next by Date: Re: Complex to real: DBLE, REAL, DIMAG and AIMAG.
- Previous by thread: Re: Get Key Function?
- Next by thread: Re: Get Key Function?
- Index(es):
Relevant Pages
|