s$ = DebugPrompt(p$)
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
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.
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