|Liberty BASIC Help Online
CONFIRM string; responseVar
This statement opens a dialog box displaying the contents of string and presenting two buttons marked 'Yes' and 'No'. When the selection is made, the string "yes" is returned if the 'Yes' button is pressed, and the string "no" is returned if the 'No' button is pressed by the user. The result is placed in responseVar.
' bring up a confirmation box to be sure that
' the user wants to quit
confirm "Are you sure you want to QUIT?"; answer$
if answer$ = "no" then [mainLoop]
If line breaks are inserted into the message, it appears as a multiline message. Line breaks are represented by chr$(13). The CONFIRM dialog window is sized to accomodate the message.
c$ = "This operation will reset defaults" + chr$(13)
c$ = c$ + "All changes will be lost." + chr$(13)
c$ = c$ + "This operation is not reversable." + chr$(13)
c$ = c$ + "Continue anyway?"
confirm c$; answer$
Copyright (C) 2003 Shoptalk Systems
Liberty BASIC - http://www.libertybasic.com/