a:CREATOR; WRITTEN ON 1/16/80 BY BRUCE W. TONKIN.b:ADAPTED FOR CP/M AND MICROSOFT BASIC 5.01 ON 5/11/80b:FOR 4.51 ON 3/18/81, AND FOR MODEL III ON 2/20/83, FOR CP/M AND MBASIC 4.51/5.2+ AGAIN ON 3/23/83; FOR 48K CP/M ON 7/2/83 WITH OVERLAYS: THIS IS THE SECOND OVERLAY, CREATOR.OVLc:THIS IS PUBLIC DOMAIN SOFTWARE AND MAY NOT BE SOLD OR INCORPORATED IN ANY COMMERCIAL SOFTWARE WITHOUT THE EXPRESS EXPRESS PERMISSION OF THE AUTHORc c xcFX: (CV$) d II (CV$):CV%((CV$,II,)): CV%" FX FX:: CV%" FX FX/d( CV%Z FX CV%CV% _Od2(CV$,II,)(CV%): II:dx #,"1006 ON FC GOSUB ";: I A: #,((D%(I) ),,);",";: : #,((D%(A) ),)d #,"1007 IF FC<";A;" THEN 1005 ELSE ";LN e #,"29010 FOR I=1 TO ";A: H$(2): CLS$;"When the record is displayed, what title should be used for": I A:"FIELD NUMBER:";I;: H$(I): #,UI;"DATA";Q$;H$(I);Q$: Ie CLS$;"Do you want to display computed data with your record (Y/N)?";HfDC$: DC$"" :: CV$DC$: :DC$CV$: DC$: ("YN",DC$) :: DC$"N" g CLS$;"All right. You may display computed data on as many fields as":"you desire. However, you should remember that, to do this, you":"will have to tell me in some detail just what you want printed"g"and how it should be printed.":"All fields are available for printing or calculations. Any":"operation allowed in BASIC is permitted, including all string,":"logical, and mathematical operations."h"HOWEVER: ALL FIELDS ARE TO BE TREATED AS STRINGS. Therefore,":"if you want to display the sum of field 7 and field 9, you must":"tell me to display VAL(G$(7))+VAL(G$(9)). All fields must be"mi"referenced by means of this G$() array, where the subscript":"(number inside parentheses) is the number of the field with":"which you are working. I will ask you for a command line, a"i"display title, and a print format for each computed or derived":"field you want to display. NOW DEPRESS ANY KEY TO CONTINUE.";#jDC$: DC$"" :: CLS$:JLfq: j RS #,"12910 FIELD #1,";RS;" AS DL$:LSET DL$=STRING$(";RS;",250):PUT 1,RP:LSET KP$=MKI$(-RP):PUT 2,KP:GOTO";SL3k RS #,"12910 FIELD #1,255 AS DL$,1 AS DX$:LSET DL$=STRING$(255,250):LSET DX$=CHR$(250):PUT 1,RP:LSET KP$=MKI$(-RP):PUT 2,KP:GOTO";SLLk #,"10860 GOTO";SLk #,"11840 IF UF>";A;" OR UF<0 THEN PRINT";Q$;"INVALID FIELD.";Q$;":GOTO 11810": #,"11850 IF UF=0 THEN";SL: #,"11860 PRINT CHR$(13);STRING$(63,32);CHR$(13);"l  #,"11865 ON UF GOSUB ";l TZ A: #,((D%(TZ) ),);",";: TZ: #,((D%(A) ),): #,"11870 IF UF<>";KF;" THEN 11900 ELSE ZZ$=STRING$(F%(";KF;"),32):LSET ZZ$=G$(";KF;8m RS #,"):FIELD #1,";RS;" AS DL$:LSET DL$=STRING$(";RS;",250):PUT 1,RP:LSET KP$=MKI$(-RP):PUT 2,KP:GOSUB 26000:KP=RP"m" RS #,"):FIELD #1,255 AS DL$,1 AS DX$:LSET DL$=STRING$(255,250):LSET DX$=CHR$(250):PUT 1,RP:LSET KP$=MKI$(-RP):PUT 2,KP:GOSUB 26000:KP=RP"n, #,"11999 FOR I=1 TO ";A;":LSET F$(I)=G$(I):NEXT :PUT 1,RP:G$=";Q$;Q$;":GOTO 11200": #,"27010 PRINT CLS$:GOSUB ";D%(KF) ;":KF$=STRING$(F%(";KF;"),32):LSET KF$=G$(";KF;")"n6 #,"27040 KP=KP+1:IF KP>";MS;" OR KP<2 THEN KP=1:REM CIRCULATE AROUND"yo@ #,"27050 GET 2,KP:RP=CVI(KP$):IF RP<-1 THEN 27040:ELSE IF RP=0 THEN ERROR 62:ELSE IF RP=-1 THEN PRINT";Q$;"RECORD NOT FOUND.";Q$;":FOR I=1 TO 2000:NEXT I:RUN"oJ #,"27055 GET 1,RP:IF LEFT$(F$(";KF;"),LEN(ZZ$))=ZZ$ THEN RETURN:ELSE 27040"oT:6p^LNLN : #,LN;"ZZ$=STRING$(F%(";KF;"),32):LSET ZZ$=G$(";((KF),);"):GOSUB 26000:KP=RP"uph #,"26040 RP=";((MS),);"*RP/9999:RP=FIX(RP):RETURN"BqrLNLN : #,LN;"REM*LOOK FOR RECORD SPACE":LNLN : #,LN;"GOSUB ";LN ;":GOTO";LN<:LNLN : #,LN;"KP=KP+1:IF KP>";MS;" OR KP<2 THEN KP=2": #,"11890 KP=KP+1:IF KP>";MS;" OR KP<2 THEN KP=2"q| #,"11895 GET 2,KP:IF CVI(KP$)<>-1 THEN 11890": #,"11896 GET 2,1:RP=CVI(KP$)+1:LSET KP$=MKI$(RP):PUT 2,1:LSET KP$=MKI$(RP):PUT 2,KP"rLNLN : #,LN;"GET 2,KP:RP=CVI(KP$):IF RP>0 THEN";LN :LNLN : #,LN;"IF RP<-1 THEN RETURN":LNLN : #,LN;"IF RP=0 THEN ERROR 62":LNLN : #,LN;"RETURN":LNLN : #,LN;"FOR K=1 TO ";ArLNLN : #,LN;"LSET F$(K)=G$(K):NEXT "hsLNLN : #,LN;"IF RP<-1 THEN PUT 1,ABS(RP):LSET KP$=MKI$(ABS(RP)):PUT 2,KP:ELSE PK=KP:GET 2,1:KP=1+CVI(KP$):LSET KP$=MKI$(KP):PUT 2,PK:PUT 1,KP:PUT 2,1"s CLS$;"Now we are almost done. We need to ask the operator if he is":"done with entry or update. You may choose the message you wish."gt"The operator's input will be limited to a single key depression.":"I would suggest something of the form:"t"Are you finished with entry? (Y/N) Enter your choice below:": TM$t"If the operator is NOT done, what should the reply be?";=uND$: ND$"" :: CV$ND$: :ND$CV$: ND$: ND$" " xu"If the operator IS done, what should the reply be?";";Q$;ND$;Q$;" THEN PRINT";Q$;"PLEASE ANSWER ";ND$;" OR ";ID$;Q$;":GOTO";BL:LNLN : #,LN;"FOR I=1 TO ";A;":G$(I)=";Q$;Q$;":NEXT :FC=0:PRINT CLS$:UF=0:G$=";Q$;Q$;":GOTO 1000"w"Do you want to cut down on remarks in the generated program?":"Please answer Y or N: "; xCV$: CV$"" :: : CV$mx CV$"Y" "I",,"C451MIN.LIB":: CV$"N" "I",,"C451.LIB":: x CLS$;"WAIT A MOMENT WHILE I FINISH YOUR PROGRAM."x& () lx0 #,A$x: S3% (A$)/u (A$)y &yD S4% (A$)y (A$)| &NyN S1% (A$)@ (A$)4 &yX S2% (A$)4 (A$)( &yb #,A$: &ylXzv CLS$;"Your program has been written and saved on the specified drive.":"You may now load it and run it, if you wish. Remember, your":"data file does NOT exist until you initialize it!"z"Thanks for running the CREATOR!": I : I:zz"ERROR NUMBER";;"AT LINE";: {"REMEMBER, ALL FIELDS ARE STRINGS WITHIN THE ARRAY G$()."{"TO PERFORM ARITHMETIC ON A FIELD, IT IS NECESSARY TO TAKE ITS":"VALUE FIRST, WITH THE VAL COMMAND. FOR EXAMPLE, TO PRINT THE":"SUM OF FIELDS 1,2, AND 3 YOU WOULD TYPE THE COMMAND LINE"{"VAL(G$(1))+VAL(G$(2))+VAL(G$(3))"|:"Now, type in a command line which will tell me what operations":"I should perform. Please don't type more than 240 characters.":"HIT THE RETURN WHEN YOU ARE DONE."|:"COMMAND LINE:";: CV$: (CV$) "TOO LONG! TRY AGAIN!": :: (CV$) 7}K:JK:J: I (CV$): (CV$,I,)Q$ J(J)E}  J  } (CV$,I,)")" KK:: (CV$,I,)"(" JKJK}  I: JKK "MISMATCHED PARENTHESES SOMEWHERE. PLEASE TRY AGAIN."~* J "MISMATCHED QUOTATION MARKS (";Q$;") IN YOUR COMMAND. PLEASE TRY AGAIN."9~4 J (JKK) p~>"What title should I use for this data:";: TI$~H (TI$,Q$) "NO QUOTATION MARKS ALLOWED.": >RJLJL : #,JL;"CL=CL+1:GOSUB 41000": #,JL;"PRINT CHR$(124);";Q$;TI$;Q$;";CHR$(124);"\"If this field is numeric, you may use a formatted print.":"If it is not, or you do not wish to print it in a formatted":"way, you need not. DO YOU WISH TO USE A FORMATTED PRINT (Y/N)"fTI$: TI$"" f:: TI$"N" p TI$"Y" \z "Number of places to the left of the decimal point=";NL$: (NL$) (NL$) "Illegal (0-16 only).": z& "Number of places to the right of the decimal point";NR$: (NR$) (NL$)(NR$) "Illegal number of places or illegal total places (0-16).": P"Do you want to use commas (Y/N): ";NC$: NC$"" :: NC$"N" NC$"Y"  NC$́TI$"USING"Q$((NL$),"#"): NC$"Y" TI$TI$","ꁶ (NR$) TI$TI$"."TI$TI$((NR$),"#")Q$";":CV$TI$CV$3 #,JL;"PRINT ";CV$~"Your commands have been accepted. Ready for the next command.": #")Q$";":CV$TI$CV$3 #,JL;"PRINT ";CV$~"Yo