comp.lang.ada
 help / color / mirror / Atom feed
* Different behavior of get_immediate in different OSs
@ 1999-01-14  0:00 Fernando Tricas
  1999-01-29  0:00 ` Nick Roberts
  0 siblings, 1 reply; 2+ messages in thread
From: Fernando Tricas @ 1999-01-14  0:00 UTC (permalink / raw)


Hello,

Compiler: gnat-3.10

Windows95 -> works as defined and does not make echo of the characters
             read.

Irix, linux, SunOS -> works as defined but does echo of the characters

HP/UX -> does not work ... it needs the return key to be pressed in order
         to work.
           
The Ada Reference Manual says nothing about get_immediate echoing or not
so, I think the first two behaviors are ok (?) but (as I understand the 
RM) the third one is not. 

Any hints, docs to read, ideas??

Thank you,

Fernando Tricas
P.S.: interested in get_immediate without echo ... any standard and
portable way to do so?








^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Different behavior of get_immediate in different OSs
  1999-01-14  0:00 Different behavior of get_immediate in different OSs Fernando Tricas
@ 1999-01-29  0:00 ` Nick Roberts
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Roberts @ 1999-01-29  0:00 UTC (permalink / raw)


(Fernando Tricas wanted Get_Immediate to work the same for different OSes.)

Unfortunately, this is one of those areas where there are always likely to
be discrepancies between Ada implementations, especially when they're
targeting significantly different operating systems. If you haven't already,
you might try using the Get_Immediate variation which have the Available
parameter, since this might (just maybe) work more consistently: I would
guess putting this in a loop with a small delay (perhaps 0.2 seconds) should
work okay (hardly ideal though).

From the Ada programming FAQ:

[If you don't have an Ada 95 compiler but have a POSIX binding,] there is a
package using POSIX services that provides non-blocking, keystroke-at-a-time
access to the terminal. It is available by FTP in file

ftp://ftp.adahome.com/pub/FAQ/inkey.ada

Using POSIX instead of Get_Immediate might be a way forward for you - but
then, of course, this is a solution that will be confined to implementations
where a POSIX binding is available.

-------------------------------------------
Nick Roberts
-------------------------------------------







^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-01-29  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-14  0:00 Different behavior of get_immediate in different OSs Fernando Tricas
1999-01-29  0:00 ` Nick Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox