comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Reading from the prompt
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Reading from the prompt [message #50117] Tue, 12 September 2006 10:01
Julio[1] is currently offline  Julio[1]
Messages: 52
Registered: May 2005
Member
FÖLDY Lajos escreveu:

> On Tue, 12 Sep 2006, Julio wrote:
>
>> Hello... Here goes a simple question. I'm reading a string from the
>> prompt using:
>>
>> B = ''
>> ; Read input from the terminal:
>> READ, B, PROMPT='Yes (Y) or No (N)?: '
>>
>> I need to put Y or N and them press ENTER. Is there a way to read Y or
>> N without pressing ENTER?
>>
>> Cheers,
>> Júlio
>>
>
> print, 'Yes (Y) or No (N)?: ' & b=get_kbrd()
>
> but read the warning in the ref. guide.
>
> regards,
> lajos
>
Ok... get_kbrd helped. Thanks for all the comments.
Julio
Re: Reading from the prompt [message #50118 is a reply to message #50117] Tue, 12 September 2006 09:50 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Tue, 12 Sep 2006, Julio wrote:

> Hello... Here goes a simple question. I'm reading a string from the
> prompt using:
>
> B = ''
> ; Read input from the terminal:
> READ, B, PROMPT='Yes (Y) or No (N)?: '
>
> I need to put Y or N and them press ENTER. Is there a way to read Y or
> N without pressing ENTER?
>
> Cheers,
> Júlio
>

print, 'Yes (Y) or No (N)?: ' & b=get_kbrd()

but read the warning in the ref. guide.

regards,
lajos
Re: Reading from the prompt [message #50119 is a reply to message #50118] Tue, 12 September 2006 09:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> Hello... Here goes a simple question. I'm reading a string from the
> prompt using:
>
> B = ''
> ; Read input from the terminal:
> READ, B, PROMPT='Yes (Y) or No (N)?: '
>
> I need to put Y or N and them press ENTER. Is there a way to read Y or
> N without pressing ENTER?

No. :-)

This is easily done with a widget, however. Have you
considered using a pop-up dialog?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Reading from the prompt
Next Topic: Re: increase the number of major tickmarks in plots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 19:04:44 PDT 2025

Total time taken to generate the page: 0.07903 seconds