home *** CD-ROM | disk | FTP | other *** search
- '
- defint a-z 'VERY IMPORTANT!!!! (speeds things up)
- clear 'initialization
- key off
- screen 0
- dim panel1$(7,4),panel2$(5,4) ' define the input info panel1s
- '
- ' note: in panel1$, the first subscript will number the fields of the
- ' input panel1. the second subscript will number the characteristics of those
- ' fields. panel1$(x,0) will contain the prompt string of field x.
- ' panel1$(x,1) and panel1$(x,2) will contain the row and column of the first
- ' character of field x ( in string form). panel1$( x,3) = max size of input
- ' string allowed. panel1$( x,4) = the reply string typed by the user.
- '
-
- ' data for first screen panel1
- data "MODEL NUMBER :" ,"4","4","10","RT-123"
- data "SERIAL NUMBER:" ,"4","43","10","234200"
- data "CUSTOMER : " ,"8","4","10",""
- data "P.O. NUMBER : " ,"8","43","10",""
- data "ASSEMBLED BY :" ,"12","4","10",""
- data "PACKAGED BY : " ,"12","43","10",""
- data "INSPECTOR : " ,"16","4","10",""
- data "STOCK NUMBER :" ,"16","43","10",""
- ' data for second screen panel1
- data "USER NAME : " ,"4","4","10",""
- data "SS NUMBER : " ,"4","43","10",""
- data "HANDLE : " ,"8","4","10",""
- data "SYSTEM : " ,"8","43","10",""
- data "LANGUAGE : " ,"12","4","10",""
- data "TYPE OF DRUG :" ,"12","43","10",""
-
- for i = 0 to 7
- for j = 0 to 4
- read panel1$(i,j)
- next j
- next i
-
- for i = 0 to 5
- for j = 0 to 4
- read panel2$(i,j)
- next j
- next i
-
- ' end of initialization
-
- ' intro screen
-
- color 15,1 : cls 'make a blue screen
-
- locate 9,15,0
- print "S U P E R - D U P E R E X A M P L E P R O G R A M";
-
- locate 10,15
- print "-----------------------------------------------------";
-
- locate 16, 34
- print "by Bob Hodge";
-
- call anykey
- ' end of intro screen
-
- call panelcolor( 15,1,10,15,0) ' set up the panel colors
- color 15,1
- cls
-
- call EditInst
-
- call promptdisplay(panel1$(),7) ' display all the prompts
- call fielddisplay(panel1$(),7) ' display all the fields (black background)
- call fieldentry(panel1$(),7)
-
- panel2$(0,4) = panel1$(0,4)
-
- ' second screen of input
- call panelcolor( 15,2,12,15,0)
-
- color 15,2
- cls
-
- call EditInst
-
- call promptdisplay(panel2$(),5) ' display all the prompts
- call fielddisplay(panel2$(),5) ' display all the fields (black background)
- call fieldentry(panel2$(),5)
-
-
-
- call anykey
-
- ' explanation screen
-
- cls
- print:print:print
- print " Now, the strings in panel1$(0,4), panel1$(1,4), (2,4), etc., contain the"
- print " info entered in the previous fields. Witness:"
- print
- print "panel1$(0,4) =" panel1$(0,4)
- print "panel1$(1,4) =" panel1$(1,4)
- print "panel1$(2,4) =" panel1$(2,4)
- print "panel1$(3,4) =" panel1$(3,4)
- print "panel1$(4,4) =" panel1$(4,4)
- print "panel1$(5,4) =" panel1$(5,4)
- print "panel1$(6,4) =" panel1$(6,4)
- print "panel1$(7,4) =" panel1$(7,4)
- print:print
-
-
- print " END OF DEMO "
- call anykey
-
- end
-
-
- sub AnyKey static
- ' press any key, etc. and will wait on a key
- locate 25,1 ' First, clear the bottom line
- print spc(79);
- locate 25, 25
- print " Press any key to continue...";
- reply$ = ""
- while len( reply$) = 0
- reply$ = inkey$
- wend
- locate 25,1 ' clear the bottom line on exit, also
- print spc(79);
- end sub
-
-
- sub EditInst static
- ' just tell the user what keys are legal to use in the panel '
- locate 24,2 : print "Editor keys: " chr$(24) ", " chr$(25) ", " chr$(26);
- print ", " chr$(27) ", BkSp, Del, Home, End and Enter (Esc to stop editor)";
- end sub