comp.lang.ada
 help / color / mirror / Atom feed
* Get is the only way ?
@ 2001-03-10  7:37 Snooze
  2001-03-10 12:19 ` Jeffrey Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Snooze @ 2001-03-10  7:37 UTC (permalink / raw)


I want have a "break" and only continuous when user press ENTER ( but only
this .. ) .. but i can't with GET ...

and .. a other question ..
it's possible .. that the user can enter only 1 press .. exemple : 'Y'
and don't need press after on the enter ..   like  GETCH in language C


need answer .. please  !
thank





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

* Re: Get is the only way ?
  2001-03-10  7:37 Get is the only way ? Snooze
@ 2001-03-10 12:19 ` Jeffrey Carter
  2001-03-10 13:53 ` Pascal Obry
  2001-03-10 17:20 ` James Rogers
  2 siblings, 0 replies; 5+ messages in thread
From: Jeffrey Carter @ 2001-03-10 12:19 UTC (permalink / raw)


Snooze wrote:
> 
> I want have a "break" and only continuous when user press ENTER ( but only
> this .. ) .. but i can't with GET ...
> 
> and .. a other question ..
> it's possible .. that the user can enter only 1 press .. exemple : 'Y'
> and don't need press after on the enter ..   like  GETCH in language C

Check out the package Ada.Text_IO in ARM A.10. You might be interested
in Skip_Line and Get_Immediate.

-- 
Jeff Carter
"You couldn't catch clap in a brothel, silly English K...niggets."
Monty Python & the Holy Grail



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

* Re: Get is the only way ?
  2001-03-10  7:37 Get is the only way ? Snooze
  2001-03-10 12:19 ` Jeffrey Carter
@ 2001-03-10 13:53 ` Pascal Obry
  2001-03-18 22:33   ` Lao Xiao Hai
  2001-03-10 17:20 ` James Rogers
  2 siblings, 1 reply; 5+ messages in thread
From: Pascal Obry @ 2001-03-10 13:53 UTC (permalink / raw)



"Snooze" <snooze-18@sympatico.ca> writes:

> I want have a "break" and only continuous when user press ENTER ( but only
> this .. ) .. but i can't with GET ...
> 
> and .. a other question ..
> it's possible .. that the user can enter only 1 press .. exemple : 'Y'
> and don't need press after on the enter ..   like  GETCH in language C

You should definitly read an Ada text book :) Just look for Get_Immediate in
Ada.Text_IO.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



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

* Re: Get is the only way ?
  2001-03-10  7:37 Get is the only way ? Snooze
  2001-03-10 12:19 ` Jeffrey Carter
  2001-03-10 13:53 ` Pascal Obry
@ 2001-03-10 17:20 ` James Rogers
  2 siblings, 0 replies; 5+ messages in thread
From: James Rogers @ 2001-03-10 17:20 UTC (permalink / raw)


If you want your program to wait until the user is ready to continue
you must interact with the user. This is typically done by waiting for
input from the user.

If you want the user to press only one key, without requiring the
Enter key, use Get_Immediate.

Jim Rogers
Colorado Springs, Colorado USA

Snooze wrote:
> 
> I want have a "break" and only continuous when user press ENTER ( but only
> this .. ) .. but i can't with GET ...
> 
> and .. a other question ..
> it's possible .. that the user can enter only 1 press .. exemple : 'Y'
> and don't need press after on the enter ..   like  GETCH in language C
> 
> need answer .. please  !
> thank



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

* Re: Get is the only way ?
  2001-03-10 13:53 ` Pascal Obry
@ 2001-03-18 22:33   ` Lao Xiao Hai
  0 siblings, 0 replies; 5+ messages in thread
From: Lao Xiao Hai @ 2001-03-18 22:33 UTC (permalink / raw)




Pascal Obry wrote:

> "Snooze" <snooze-18@sympatico.ca> writes:
>
> > I want have a "break" and only continuous when user press ENTER ( but only
> > this .. ) .. but i can't with GET ...
> >
> > and .. a other question ..
> > it's possible .. that the user can enter only 1 press .. exemple : 'Y'
> > and don't need press after on the enter ..   like  GETCH in language C
>
> You should definitly read an Ada text book :) Just look for Get_Immediate in
> Ada.Text_IO.

If you design with Ada tasks, you can design so Get_Immediate is checking the
buffer, accepting a character, examining the character to see if you want to do
something with it, etc.

Richard Riehle




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

end of thread, other threads:[~2001-03-18 22:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-10  7:37 Get is the only way ? Snooze
2001-03-10 12:19 ` Jeffrey Carter
2001-03-10 13:53 ` Pascal Obry
2001-03-18 22:33   ` Lao Xiao Hai
2001-03-10 17:20 ` James Rogers

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