comp.lang.ada
 help / color / mirror / Atom feed
* Use of the GET_IMMEDIATE and FLUSH procedures in TEXT_IO
@ 1996-07-16  0:00 Marin David Condic, 407.796.8997, M/S 731-93
  1996-07-17  0:00 ` Nasser Abbasi
  0 siblings, 1 reply; 3+ messages in thread
From: Marin David Condic, 407.796.8997, M/S 731-93 @ 1996-07-16  0:00 UTC (permalink / raw)



    Maybe this question has been asked. Sorry if its a "repeat" but I
    couldn't find the answer in the LRM...

    I'm using GNAT 3.04 for Windows NT. It's working very nicely. I
    was trying to implement the garden-variety "<Hit any key to
    continue>" operation and was trying to use the GET_IMMEDIATE
    procedure in TEXT_IO. It seems that the effect is not what one
    would like (as least not running from within an MS-DOS window, and
    I know of no other way to utilize TEXT_IO...<no GUI builder>). The
    call will read a single character, but it hangs, waiting for the
    ENTER key to be hit.

    I've tried following this with the FLUSH procedure to no effect.
    (The FLUSH procedure is mysteriously undocumented in the Ada95
    LRM. I wonder why this is?)

    Any clues as to how this is really supposed to operate? Any
    suggestions on implementing the "<Hit any key to continue>"
    operation?

    MDC

Marin David Condic, Senior Computer Engineer    ATT:        407.796.8997
M/S 731-96                                      Technet:    796.8997
Pratt & Whitney, GESP                           Fax:        407.796.4669
P.O. Box 109600                                 Internet:   CONDICMA@PWFL.COM
West Palm Beach, FL 33410-9600                  Internet:   CONDIC@FLINET.COM
===============================================================================
    "The concept is interesting and well-formed, but in order to earn
    better than a 'C,' the idea must be feasible."

        --  A Yale University management professor in response to Fred
            Smith's paper proposing reliable overnight delivery service.
            (Smith went on to found Federal Express Corp.)
===============================================================================




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

* Re: Use of the GET_IMMEDIATE and FLUSH procedures in TEXT_IO
  1996-07-16  0:00 Use of the GET_IMMEDIATE and FLUSH procedures in TEXT_IO Marin David Condic, 407.796.8997, M/S 731-93
@ 1996-07-17  0:00 ` Nasser Abbasi
  1996-07-17  0:00   ` Robert Dewar
  0 siblings, 1 reply; 3+ messages in thread
From: Nasser Abbasi @ 1996-07-17  0:00 UTC (permalink / raw)
  To: Marin David Condic, 407.796.8997, M/S 731-93



   From: "Marin David Condic, 407.796.8997, M/S 731-93" <condicma@PWFL.COM>

       Maybe this question has been asked. Sorry if its a "repeat" but I
       couldn't find the answer in the LRM...

       I'm using GNAT 3.04 for Windows NT. It's working very nicely. I
       was trying to implement the garden-variety "<Hit any key to
       continue>" operation and was trying to use the GET_IMMEDIATE
       procedure in TEXT_IO. It seems that the effect is not what one
       would like (as least not running from within an MS-DOS window, and
       I know of no other way to utilize TEXT_IO...<no GUI builder>). The
       call will read a single character, but it hangs, waiting for the
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       ENTER key to be hit.


How do you it reads a single character if it hangs?  :)

If used correct it should work, but may be Get_Immediate is not
implemented on NT platform version of Gnat? I seem to rememeber reading
here sometime ago that Get_Immediate might not be implementable on all
platforms. Are you calling it with the parameter Avaliable or not ?
can you show a small code example where you demonstrate it does not work?


       I've tried following this with the FLUSH procedure to no effect.
       (The FLUSH procedure is mysteriously undocumented in the Ada95
       LRM. I wonder why this is?)

There is a mention of flush in the LRM in A.10.1 and A.12.1 (just the call 
itself), but the Rational mention more about it in A.4.2 (which is 
flushing any data in the output buffer to the output device that has not
 yet been outputed).

       Any clues as to how this is really supposed to operate? Any
       suggestions on implementing the "<Hit any key to continue>"
       operation?

       MDC

It _should_ work as the RM says it should :)

Nasser
-- 
Nasser Abbasi. C/C++/Ada Solaris. GeneAssist - A client/server application 
for Nucleic acid and protein sequence search and analysis. 
Perkin Elmer - Applied BioSystem division. email:  nasser@apldbio.com   
MSEE(control), MSCS, MSCE, FM (Fide Chess Master).







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

* Re: Use of the GET_IMMEDIATE and FLUSH procedures in TEXT_IO
  1996-07-17  0:00 ` Nasser Abbasi
@ 1996-07-17  0:00   ` Robert Dewar
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Dewar @ 1996-07-17  0:00 UTC (permalink / raw)



Nasser notes that Get_Immediate may not be implemented on all GNAT
platforms, and says

"It _should_ work as the RM says it should :)"

Well, a slight correction, => "as the RM *advises* that it should"

Get_Immediate is implemented in accordance with the RM requirements on
all GNAT platforms, but does not follow the implementation advice on
all platforms, and of course in practice, it is this implementation advice
that makes it useful.

It works correctly on most GNAT platforms now, and should work on nearly
all by the next release. Certainly the new NT release should solve this
problem (the next NT release will use the Cygnus library, which is much
more Unix-like and will solve a lot of existing problems).





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

end of thread, other threads:[~1996-07-17  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-16  0:00 Use of the GET_IMMEDIATE and FLUSH procedures in TEXT_IO Marin David Condic, 407.796.8997, M/S 731-93
1996-07-17  0:00 ` Nasser Abbasi
1996-07-17  0:00   ` Robert Dewar

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