User Tools

Site Tools


el:prompt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

el:prompt [2016/01/01 22:39]
el:prompt [2020/02/28 10:46] (current)
Line 1: Line 1:
 +===== Prompt =====
 +
 +==== Format ====
 +
 +**prompt** ( //message// )\\
 +**prompt** ( //message// , //default//)
 +
 +==== Description ====
 +
 +This function displays a message box with an input box and returns a string value of what the user typed in the box.  You may set the default value by setting a second string argument.
 +
 +==== Example ====
 +
 +<code>a$ = prompt("What state do you live?","KY")
 +if a$ = "KY" then
 +   print "Kentucky."
 +else
 +   print "Somewhere Else"
 +end if</code>
 +draws\\
 +{{:prompt.png|Prompt}}
 +
 +==== See Also ====
 +{{page>en:start#Keyboard and User Input&noheader}}
 +
 +==== History ==== 
 +0.9.9.42 - added statement