Name
DebugPrompt -- read user input from debug device (V5.0)
Synopsis
s$ = DebugPrompt(p$)
Function
This function can be used to prompt the user to enter a string in the current debug device. DebugPrompt() will present the string specified in p$ as the prompt and halt the script's execution until the user has entered a string and confirmed his input using the RETURN key. The string will then be returned by this function.

This call can be disabled by specifying the ‘-nodebug’ console argument when running a script or applet. In that case, calling DebugPrompt() will just return an empty string. See Console arguments for details.

Also note that when compiling an applet or executable, debugging will be automatically disabled unless you explicitly enable it by setting the EnableDebug tag to True in @OPTIONS. So if you have compiled an applet or executable and you see that DebugPrompt() doesn't do anything, the reason is probably that debugging is disabled.

Inputs
p$
prompt to present to the user
Results
s$
string entered by user
Example
name$ = DebugPrompt("What is your name? ")
age$ = DebugPrompt("And your age? ")
home$ = DebugPrompt("Where do you live? ")
DebugPrint("Your name is", name$, "and you are", age$,
           "years old and live in", home$, "!")
The code above demonstrates the usage of the DebugPrompt() function.

Show TOC