Re: Please help w/ first program!!!!1
[Prev][Next][Index][Thread]
Re: Please help w/ first program!!!!1
> All languages I know of don't allow it. Whenever a loop is entered, the
> calculator has to keep track of it until it reaches the END statement and
> leaves the loop. If it doesn't reach that end statement, it gets confused.
> In the case of the TI-85, it keeps track of the loop. When that loop is
> entered again, it keeps track of it a second time, and so on. Eventually
> the memory gets filled up, and the program crashes.
> > The problem is that you jumped out of an IF..THEN..ELSE..ENDIF. structure
> > with a GOTO. That's not allowed in (almost) any programming language.
Do you know of languages like C, C++, Pascal, and Visual Basic? They all allow
this. I would even say that one of the few reasons to ever use goto is to jump
out of a deeply nested control structure.
Compiled languages don't have their programs keep track of loops on a stack
at runtime, so there is no problem with using goto this way. And as far as I
know they are much more popular than interpreted languages like TI Basic..
TTFN
Andy
References: