home *** CD-ROM | disk | FTP | other *** search
/ Futura 12 / Futura_Issue_12_1994_03_NOSAUG_Side_A_BASIC.atr / flyer.doc < prev    next >
Text File  |  2023-02-26  |  3KB  |  1 lines

  1. ¢*************************¢* THE TURBO BASIC FLYER *¢* by Ron Fetzer, OHAUG  *¢*************************¢¢¢PROGRAMMING MADE EASY - PART II(ii)¢by Ron Fetzer, Ol' Hackers A.U.G.¢¢¢LOCK A FILE MODULE(LOK)¢¢    I first call the SCREEN directory then I call the FILE module.  I use the XIO 35 command to lock the files.  When I am finished I call the SCREEN directory again to CHECK to see if the action has been done.¢¢3500 PROC LOK:CLS :YN$=""¢3510   EXEC SCRN¢3520   ? :? "            LOCK A FILE"¢3530   ? "            ---- - ----"¢3540   EXEC FILE¢3550   XIO 35,#1,0,0,K$:CLOSE #1¢3560   ? :INPUT "GO AGAIN(Y/N)>>",YN$¢3570   IF YN$(1,1)="Y":GOTO 3540¢       :ELSE :GOTO 3800:ENDIF ¢3800   EXEC SCRN¢3980 ENDPROC ¢3990 ------------------------------¢¢¢THE UNLOCK, RENAME AND DELETE MODULE¢¢    These modules are straight programming.  In the RENAME MODULE in line 5060-5080 I concatenate 4 strings into one string as previously explained.¢¢¢UNLOCK MODULE(UNLOK)¢¢4000 PROC UNLOK:CLS :YN$=""¢4010   EXEC SCRN¢4020   ? :? "         UNLOCK A FILE"¢4030   ? "         ------ - ----"¢4040   EXEC FILE¢4050   XIO 36,#1,0,0,K$:CLOSE #1¢4060   ? :INPUT "GO AGAIN(Y/N)>>",YN$¢4070   IF YN$(1,1)="Y":GOTO 4040:¢       ELSE :GOTO 4080:ENDIF ¢4080   EXEC SCRN¢4480 ENDPROC ¢4490 ------------------------------¢¢¢RENAME MODULE(RENAM)¢¢5000 PROC RENAM:CLS :YN$="":X$=""¢5010   EXEC SCRN¢5020   ? :? "          RENAME A FILE"¢5030   ? "          ------ - ----"¢5040   ? :INPUT "ENTER OLD FILE¢       NAME>>",F$¢5050   INPUT "ENTER NEW FILE¢       NAME>>",FZ$¢5060   IF DR=1 THEN X$="D1:"¢       :X$(LEN(X$)+1)=F$¢       :X$(LEN(X$)+1)=","¢       :X$(LEN(X$)+1)=FZ$¢5070   IF DR=2 THEN X$="D2:"¢       :X$(LEN(X$)+1)=F$¢       :X$(LEN(X$)+1)=","¢       :X$(LEN(X$)+1)=FZ$¢5080   IF DR=8 THEN X$="D8:"¢       :X$(LEN(X$)+1)=F$¢       :X$(LEN(X$)+1)=","¢       :X$(LEN(X$)+1)=FZ$¢5090   XIO 32,#1,0,0,X$:CLOSE #1¢5100   ? :INPUT "GO AGAIN(Y/N)>>",YN$¢5120   IF YN$(1,1)="Y":GOTO 5040¢       :ELSE :GOTO 5130:ENDIF ¢5130   EXEC SCRN¢5480 ENDPROC ¢5490 ------------------------------¢¢¢DELETE MODULE(DELET)¢¢5500 PROC DELET:CLS :YN$=""¢5510   EXEC SCRN¢5520   ? :? "          DELETE A FILE"¢5530   ? "          ------ - ----"¢5540   EXEC FILE¢5550   XIO 33,#1,0,0,K$:CLOSE #1¢5560   ? :INPUT "GO AGAIN(Y/N)>>",YN$¢5570   IF YN$(1,1)="Y":GOTO 5540¢       :ELSE :GOTO 5580:ENDIF ¢5580   EXEC SCRN¢5980 ENDPROC ¢5990 ------------------------------¢¢¢THE FORMAT AND END MODULE(FORMT & FINI)¢¢    In the FORMAT MODULE I use XIO 253 to format single density and XIO 254 to format 1050 density.  I did not call for the DENSITY MODULE because I did not want to format the RAMDISK D8.¢¢¢    I have now shown you all the modules in the program and how we flesh out the SKELETON PROGRAM.¢¢    When you fill in the modules you do not always have to list the whole program to go back to the place you want to go.  In the direct mode type "GOTO 6500" etc.¢¢[ED- To see the whole fleshed out program, boot Turbo BASIC and then LOAD "D:SECRTARY.TUR" on Side B of Futura issue 10.  Next, LIST and use CTRL-1 to pause the listing.]¢¢    The final step is to RENUMBER your program.  Use RENUM 10,10,10.¢¢    Your comments are welcome!  Please write to:¢¢RON FETZER¢22 MONACO AVE¢ELMONT, N.Y. 11003¢U.S.A.¢