User Tools

Site Tools


pt:confirm

Differences

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

Link to this comparison view

pt:confirm [2016/01/01 22:47]
pt:confirm [2020/02/28 10:46] (current)
Line 1: Line 1:
 +===== Confirm =====
 +
 +==== Formato ====
 +
 +**confirm** ( //message// )\\
 +**confirm** ( //message// , //default//)
 +
 +==== Descrição ====
 +
 +
 +
 +Esta função mostra uma caixa de mensagem com os botões "Sim","Não". O valor "true" será devolvido quando o utilizador selecciona "Yes" e "false" quando "No" é seleccionado. 
 +
 +==== Exemplo ====
 +
 +<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}}
 +
 +==== Ver também ====
 +{{page>en:start#Keyboard and User Input&noheader}}
 +
 +==== Historia ==== 
 +0.9.9.42 - added statement
  
pt/confirm.txt · Last modified: 2020/02/28 10:46 (external edit)