Subject: | |
From: | |
Reply To: | VANCE,JEFF (HP-Cupertino,ex1) |
Date: | Thu, 6 Sep 2001 10:47:15 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> OK, OK, OK, stop responding. I forgot about the input
> command......
> input x,'Press any key to continue:';readcnt=1
Just to reveal a few more useful tidbits:
- the INPUT command also allows the read on $STDIN to be timed (wait= parm)
- it also allows you to direct the prompt to the system console and capture
the operator's reply in the variable
- INPUT supports the specification of a default value for the variable.
- the variable is always a string variable, regardless of user input. *
- there is a corresponding input() function. The main differences
between a) :input foo,"prompt" vs. b) :setvar foo input("prompt") are:
. in a) the variable is not always set, eg. user just hits return, in b)
foo will always be set
. I/O redirection is supported for a) and not for b)
(*) see HELP INPUT and HELP INPUTFN for more details.
Hope this is useful to some,
Jeff Vance, CSY
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|