LENOIL@MIT-XX.ARPA (03/08/84)
From: Robert S. Lenoil <LENOIL@MIT-XX.ARPA> There IS a kludgey way to create long BASIC lines, although I'm sure that the need for doing same can be worked around. For instance, you mentioned ON X GOTO ... If you can only fit 10 line #'s, for instance, then the next line of your program can be: ON X-10 GOTO ...; since your program would fall through the first line. Here's how it would be done: 10 ON X GOTO 1000,1010,1020,1030,2000,2050,3010 : GOTO 30 20 ON X-7 GOTO 3040,4000,4050,5090 30 ... Now, if you still need to create long BASIC lines, here's how: Find out how many extra characters you'll need. Then create a dummy program line after the line of interest that is that long, minus five (for the BASIC link bytes, line # bytes and zero end-of-line byte). Fill the line with something like "qqqq..." Then run a for-next loop in direct mode to find the first instance in memory of "qqq..." That would look something like this: Q=ASC("Q") ; FOR A=2050 TO 45000 : IF PEEK(A)<>Q AND PEEK(A+1)<>Q THEN NEXT then when the loop ends, type PRINT Q Starting from Q-5, poke in the extra bytes that you need (remember to use tokens for keywords). Finally, press return on some line in your program. That will fix the line chaining, and you should be ready to go...and pray that you typed that line in correctly! The ONLY reason I could justify for using this method is to crunch a program into the small memory space of a VIC-20, for instance, since every line eliminated results in a five byte savings. When I did have to do this for the VIC once, I was able to use the CHANGE command in the programmer's aid cartridge. If you have access to any sort of CHANGE command, then the process can be greater simplified. Just do this: 10 FOR A= ... (random program line) ... QQ <--just add the QQ to the end CHANGE !QQ!(whatever you want to add)! The only real restriction on long lines, is that they should be less than 256 characters long. Good luck, and I hope that you never have to do this! Robert Lenoil Sunshine Pripherals Inc. -------
blk@sytek.UUCP (Brian L. Kahn) (03/12/84)
I thought that all CBM machines would create lines up to 120 chars using the insert key in an 80 char line. The penalty is you can't edit the line in the future. Isn't this true? B<
porter@inuxd.UUCP (J Porter) (03/13/84)
You can get slightly over 80 characters by abbreviating BASIC keywords (tokens), but in general you can't get more than 80 characters with the screen editor, even with with insert key. Jeff Porter (inuxd!porter)