jrhodes Posted April 30, 2018 Share Posted April 30, 2018 (edited) Attached is the original version and a version modified by me of Parallel Systems,Inc.'s Great Inventions."GREATINVEN" is the original, and "GREATINV" is the modified version.For some reason, i just could not stand looking at that huge pile of GOTO statements. There just had to be a better way of coding this.The following lines were removed entirely:7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51The GOTO stack was replaced by:2 @=50403 FOR \=1 TO 504 @=@+105 GOTO @6 NEXT \Lines 2030 and 2035 needed to be updated as follows to work with with my removal of the GOTO stack:2030 ON A GOTO 5050,5060,5070,5080,5090,5100,5110,5120,5130,5140,5150,5160,5170,5180,5190,5200,5210,5220,5230,5240,5250,5260,5270,5280,52902035 ON B GOTO 5300,5310,5320,5330,5340,5350,5360,5370,5380,5390,5400,5410,5420,5430,5440,5450,5460,5470,5480,5490,5500,5510,5520,5530,5540 Great Inventions modified and original.zip Edited April 30, 2018 by jrhodes 4 Quote Link to comment Share on other sites More sharing options...
RXB Posted May 1, 2018 Share Posted May 1, 2018 Attached is the original version and a version modified by me of Parallel Systems,Inc.'s Great Inventions. "GREATINVEN" is the original, and "GREATINV" is the modified version. For some reason, i just could not stand looking at that huge pile of GOTO statements. There just had to be a better way of coding this. The following lines were removed entirely: 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 The GOTO stack was replaced by: 2 @=5040 3 FOR \=1 TO 50 4 @=@+10 5 GOTO @ 6 NEXT \ Lines 2030 and 2035 needed to be updated as follows to work with with my removal of the GOTO stack: 2030 ON A GOTO 5050,5060,5070,5080,5090,5100,5110,5120,5130,5140,5150,5160,5170,5180,5190,5200,5210,5220,5230,5240,5250,5260,5270,5280,5290 2035 ON B GOTO 5300,5310,5320,5330,5340,5350,5360,5370,5380,5390,5400,5410,5420,5430,5440,5450,5460,5470,5480,5490,5500,5510,5520,5530,5540 Great Inventions modified and original.zip Well this is a perfect example of really bad code even in Basic or XB. The real solution is to use CALL (Subroutine name) and use the @ as a index to that line. This is how it should be done in TI99/4A XB. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted May 2, 2018 Share Posted May 2, 2018 Attached is the original version and a version modified by me of Parallel Systems,Inc.'s Great Inventions. "GREATINVEN" is the original, and "GREATINV" is the modified version. For some reason, i just could not stand looking at that huge pile of GOTO statements. There just had to be a better way of coding this. The following lines were removed entirely: 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 The GOTO stack was replaced by: 2 @=5040 3 FOR \=1 TO 50 4 @=@+10 5 GOTO @ 6 NEXT \ Lines 2030 and 2035 needed to be updated as follows to work with with my removal of the GOTO stack: 2030 ON A GOTO 5050,5060,5070,5080,5090,5100,5110,5120,5130,5140,5150,5160,5170,5180,5190,5200,5210,5220,5230,5240,5250,5260,5270,5280,5290 2035 ON B GOTO 5300,5310,5320,5330,5340,5350,5360,5370,5380,5390,5400,5410,5420,5430,5440,5450,5460,5470,5480,5490,5500,5510,5520,5530,5540 Great Inventions modified and original.zip Neat!!! Looking forward to downloading and playing!! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.