Skip to main content

Using INPUT/PROMPT (unibasic on Unidata)

  • April 15, 2025
  • 4 replies
  • 0 views

Shawn Waldie
Forum|alt.badge.img

What syntax do I need to prompt the user - who runs a program from the terminal - for input, but I don't want it to echo back to the terminal?



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

4 replies

Joe Goldthwaite
  • Participating Frequently
  • 124 replies
  • April 15, 2025

What syntax do I need to prompt the user - who runs a program from the terminal - for input, but I don't want it to echo back to the terminal?



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
"ECHO OFF" before the input turns it off. "ECHO ON" turns it back on.

Shawn Waldie
Forum|alt.badge.img
  • Author
  • 54 replies
  • April 15, 2025
"ECHO OFF" before the input turns it off. "ECHO ON" turns it back on.

That was too easy.

Thanks Joe!

I'm surprised that isn't one of the related commands for the help on INPUT:



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

Mike Rajkowski
Forum|alt.badge.img+1
  • Rocketeer
  • 162 replies
  • April 16, 2025

What syntax do I need to prompt the user - who runs a program from the terminal - for input, but I don't want it to echo back to the terminal?



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------

Shawn,

I agree, and I can see why you would expect to see ECHO listed as a related command, since the documentation for ECHO states:

"If ECHO ON is specified, subsequent input characters are displayed, or echoed, on the screen. If ECHO OFF is specified, subsequent input characters are assigned to the INPUT statement variables but are not displayed on the screen."

Note that another way do suppress output is the hush command, but the doc does not specifically call out its use with the INPUT statement.

From the UniVerse Documentation:

"Use the HUSH statement to suppress the display of all output normally sent to a terminal during processing. HUSH also suppresses output to a COMO file or TANDEM display."



------------------------------
Mike Rajkowski
MultiValue Product Evangelist
Rocket Internal - All Brands
US
------------------------------

Shawn Waldie
Forum|alt.badge.img
  • Author
  • 54 replies
  • April 16, 2025

Shawn,

I agree, and I can see why you would expect to see ECHO listed as a related command, since the documentation for ECHO states:

"If ECHO ON is specified, subsequent input characters are displayed, or echoed, on the screen. If ECHO OFF is specified, subsequent input characters are assigned to the INPUT statement variables but are not displayed on the screen."

Note that another way do suppress output is the hush command, but the doc does not specifically call out its use with the INPUT statement.

From the UniVerse Documentation:

"Use the HUSH statement to suppress the display of all output normally sent to a terminal during processing. HUSH also suppresses output to a COMO file or TANDEM display."



------------------------------
Mike Rajkowski
MultiValue Product Evangelist
Rocket Internal - All Brands
US
------------------------------

Thanks for the info, Mike.

It's always nice to have options.



------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------