HTBasic Help
×
Menu
Index

Example: File Dialog

 
10     ! *********************************************************************
20     ! Example: FILE Dialog
30     !
40     ! This program produces a FILE Dialog. A file name,
50     ! which the  user selects from the list or types in,
60     ! is returned through the S$ string variable. The
70     ! button selected (OK or Cancel) is also displayed.
80     !
90     ! ***************************************
100   !
110   CLEAR SCREEN
120   INTEGER Btn
130   DIM S$[64]
140   DIALOG "FILE","Please select a file:",Btn;SET ("TITLE":" Example: FILE Dialog"),RETURN ("SELECTION":S$)
150   PRINT "Button           File"
160   PRINT
170   IF Btn=0 THEN
180     PRINT "  OK",S$
190   ELSE
200     PRINT "Cancel",S$
210   END IF
220   END