HP3000-L Archives

September 2001, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Thu, 6 Sep 2001 10:47:15 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
> 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 *

ATOM RSS1 RSS2