User Tools

Site Tools


en:confirm

Differences

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

Link to this comparison view

en:confirm [2016/08/12 12:28]
admin
en:confirm [2020/02/28 10:46]
Line 1: Line 1:
-===== Confirm (Function) ===== 
- 
-==== Format ==== 
- 
-**confirm** ( [[expressions|prompt]] )\\ 
-**confirm** ( [[expressions|prompt]], [[booleanexpressions|boolean_expression]]) 
- 
- 
-returns [[booleanexpressions|boolean_expression]] 
- 
-==== Description ==== 
- 
-This function displays a message box with "Yes" and "No" buttons.  A true value will be returned when the user selects "Yes" and false will be returned when "No" is selected.  You may set the default button by setting a second argument to true or false. 
- 
-==== Example ==== 
- 
-<code>ans = confirm("Do you wish to continue") 
-if ans then 
-   print "continue on" 
-else 
-   print "end everything" 
-   end 
-end if</code> 
-draws\\ 
-{{:confirm.png|Confirm}} 
- 
-==== See Also ==== 
-{{page>en:start#Keyboard and User Input&noheader}} 
- 
-==== History ====  
-|0.9.9.42|New to Version| 
  
en/confirm.txt ยท Last modified: 2020/02/28 10:46 (external edit)