home *** CD-ROM | disk | FTP | other *** search
/ Futura 18 / Futura_Issue_18_1996_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, Ol' Hackers Atari User Group.¢¢¢YOUR WORDPROCESSOR AS A DE-BUGGER¢¢    How many times have you written a long BASIC program and realized that you want to change a variable or find a particular command.  This can sometimes be quite tedious.  Here is an easy way of doing it using your wordprocessor.¢¢1. Save your program with the LIST command.  LIST "D:FILE"¢¢2. Use your wordprocessor to load the listed file.  I use First XLEnt Word Processor.¢¢3. Go to the SEARCH routine and type in the variable that you are looking for.  You can replace it one at a time or GLOBALLY.¢¢4. SAVE your program with the wordprocessor.¢¢5. Take out the wordprocessor and recall your program with the ENTER command.  ENTER "D:FILE"¢¢    You can load a SAVED file into a wordprocessor but it does not make any sense when you view it because it is saved in tokenized form on the disk.  That is the reason we use the LIST/ENTER commands.  Under this protocol the file is saved letter by letter on the disk.¢¢¢PAGE 6 FREE MEMORY CHECKER¢¢    Sometimes a need arises where you have two chained programs and you want to save a numeric variable from the first program.  When you reboot the second program ALL normal variables are erased except those stored in memory PAGE 6.  Various disk operating systems use part of this memory and you have to find out which part is free.  This program will print a 0 next to each free memory location that you can use.¢¢    When you find a free memory location that you want to use then in the first program, DPOKE it.  Example: 30 DPOKE 1785,23.  We have stored the number 23 in memory location 1785.¢¢    When the second program boots up you can retrieve this with a DPEEK.  Example: 20 LET X=DPEEK(1785).  X will now = 23 which was the value obtained from the first program.¢¢¢PASSING ON STRING VARIABLES¢¢    Chained programs are two or more programs where the first program boots up the second automatically.¢¢    Number variables can be passed on easily in chained programs using PAGE 6 (see above).  Passing on String variables in chained programs is more difficult and requires a disk drive.¢¢    The first program automatically deposits the Strings and number variables on a disk.  The second program then loads up these variables from the disk when it boots up.¢¢    Please save the first program with SAVE "D:PROGRAM1.TUR" and the second with SAVE "D:PROGRAM2.TUR".  These two programs will pass on two String variables and a number variable.¢¢    In PROGRAM1.TUR line 150 calls for PROGRAM2.TUR.  In lines 90-130 we write the variables to the disk.¢¢    In PROGRAM2.TUR we retrieve the variables from the disk with lines 70-90.  This procedure is sometimes called VIRTUAL MEMORY.¢¢¢¢NOTE:  PAGE6.TUR, PROGRAM1.TUR and PROGRAM2.TUR are included on this disk.  Load and run with Turbo BASIC.¢