BB___PROMPT

=PROMPT= toc

Description
> Provides a pre-made dialog window with a textbox to capture user's response. The user responds to the "string expression" message. The response is stored in "responseVar$".

Syntax
> //This form allows retrieval of a numerical value// > //This form adds a Caption to the window//
 * 1) prompt //"string expression"; responseVar$//
 * 1) prompt //"string expression"; responseVar//
 * 1) prompt //"Window Title" + chr$(13) + "string expression"; responseVar$//

Hints

 * To show a default value in the textbox, assign a string value to responseVar$ before the PROMPT statement. (The default value can be typed over by the user, if needed.)
 * The response is captured and the window closed by either clicking the OK button or pressing the Enter key. Clicking Cancel returns an empty string and closes the window.

Example
code format="lb" ' The basic PROMPT statement

prompt "Please enter your name"; name$ print "Thank you, "; name$

' The basic PROMPT statement with Caption added prompt name$ + chr$(13) + "Enter your age"; age print name$; ", you are "; age; " years old."

' With Caption and default response entered msg$ = "Yes or No" reply$ = "Yes" prompt "Continue?" + chr$(13) + msg$; reply$ print reply$ end code

Useful Functions
code format="lb" Place a useful function using this command here code