Pristine Ack-5.5
[Ack-5.5.git] / lang / basic / test / creator.b
1   10 rem The Creator
2   20 rem 80 micro jan 1983
3   80 print"This is the Creator. It will allow you to generate"
4   90 print"a progam which will create and access a data file."
5  100 print"For later use. Please type the proposed program name."
6  110 print"You are limited to 8 alphabetic characters."
7  120 print" program name=";:lineinputpn$
8  130 fori=1tolen(pn$):a$=mid$(pn$,i,1):ifa$>"z"ora$<"A"thenprint"alpha characters only!":goto 120
9  140 nexti
10  150 iflen(pn$)>8thenprint"too long":goto 120
11  160 print"when the proposed program is run, which drive contains the"
12  170 print"data file(0-3)?";
13  180 an$=inkey$:ifan$="" then 180 elseif(an$>"3"oran$<"0")then170
14  190 printan$
15  200 print"which drive do you want the program written on? (0-3)";
16  210 dn$=inkey$:ifdn$="" then 210 elseif(dn$>"3"ordn$<"0")then200
17
18  240 print#1," 1 rem*******Program name:";pn$;"*******"
19  250 print#1," 2 rem*******Data File name:";df$;"*****"
20  260 print#1," 3 rem*******Data File is on drive";ans$;"******"
21  270 input"What is the maximum data file size, in # of records";ms
22  280 input"What is the record length(1-255)";rr:ifrr<0orrr>255then280 else r%=256/rr
23  290 ifms*256/r%>85760thenprint"not enough room on a single disk for this.":goto 270
24  300 print#1,"4 rem ******maximum file size is";ms;"records******"
25  310 print#1,"5 rem****** record length is";rr;"packed";r%;"per sector"
26  320 q$=chr$(34)
27  330 print"please type in a title for your generated program.":lineinputti$
28  340 ln=ln+10:print#1,ln;"rem change disks reinitialize here"
29  350 ln=ln+10