Re: TIB: Not using goto.


[Prev][Next][Index][Thread]

Re: TIB: Not using goto.




Christopher Robin MacDougald wrote:
> 
> Jody,
>         Why would you suggest not using a goto? It works fine when I've used
> it. You just have to be very careful about where you use it and how
> often. I own an 85 and yes there are instances where I can see this as a
> negative thing but on a whole it's really not that bad. Oh one more
> thing about my programs I used matrixes on the Calculator Man and a few
> others but once they where finished (as long as you don't press on and
> quit) it would shrink them back to 1,1. I also changed graphing options
> and have them go back to the factory default when you exit the programs.
> I think it should be a part of every good program to include help and
> return to the defaults so that even a person with few calc knowledge can
> not worry about "messing up" their calculator when they play a game.
> Happy programming,
> Christopher Robin MacDougald

Duh! Answer everything... :P
I agree that if you use a big matrix it can be a good idea to reset it 
something smaller. On the 83 you can use DelVar( and get rid of it 
altogether. Sometimes, however, it is better to leave it alone. My 
version of monopoly required a 7 X 40 matrix. I had a seperate 
subprogram that would create the matrix in case it got erased, but it 
was over 2500 bytes so I had to erase it. Erase that matrix, and the 
game is useless. Another program is one that will create a magic 
square (you know, all the columns, rows, and main diagonals all add to 
the same number). All the numbers are stored in a matrix, but they 
can't be displayed from within the program. I don't know about the 85, 
but on the 83 if you display a big matrix and use the Pause command, 
you can't scroll around the display. This problem can be avoided using 
the getKey command, but it starts to turn into a big mess really 
quickly. As far as saving the values before the program is run; this 
is, in my opinion, much easier on the 83. Since all the variable names 
on the 82/83 are either letters or built in variables (Xmin, Xmax, 
various statistics stuff) you can just run a quick loop that saves 
each letter and @ into a list. At the end of the program, run a 
similar list to put everything back. But to be honest, I don't think 
it makes that big of a difference. For example, in many of my games 
the screen is set so that each pixel is a point. This can screw up 
graphing functions, but all the user has to do is hit Zoom Standard. I 
don't know, I guess it's just a pet peeve, but if they can't figure 
out Zoom Standard than I think they are probably in big trouble 
anyways. Well, enough rambling....:P

Jody Snider
jody1@alaska.net


Follow-Ups: References: