User Tools

Site Tools


es:confirm

Differences

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

Link to this comparison view

es:confirm [2016/01/01 22:42]
es:confirm [2020/02/28 10:46] (current)
Line 1: Line 1:
 +===== Confirm (Función) =====
 +
 +==== Formato ====
 +
 +**confirm** ( //prompt_expr// )\\
 +**confirm** ( //prompt_expr//, //boolean_expr//)
 +
 +devuelve un valor booleano  \\  
 + \\ 
 +
 +==== Descripción ====
 +
 +Esta función visualiza una ventana de mensaje con botones Yes(si) y No(no). Si el usuario pulsa Yes se devolverá true (verdadero) y false (false) si se pulsa No \\ 
 +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.
 +
 +==== Ejemplo ====
 +
 +<code>ans = confirm("¿Quiere continuar?")
 +if ans then
 +   print "continuar"
 +else
 +   print "terminar todo"
 +   end
 +end if</code>
 +presentará\\
 +{{:confirm.png|Confirm}}
 +
 +==== See Also ====
 +{{page>en:start#Keyboard and User Input&noheader}}
 +
 +==== Historia ==== 
 +|0.9.9.42|Nueva Version|
  
es/confirm.txt · Last modified: 2020/02/28 10:46 (external edit)