ti84-forth icon indicating copy to clipboard operation
ti84-forth copied to clipboard

Stack underflow not reported during runtime

Open mczero80 opened this issue 4 years ago • 2 comments

Hello,

I did install it on a TI 83+, seems to work, not only on 84+.

I did a short test, something like:

43 11 SWP + . . .

It printed the calculated value just fine, but I could repeat >.< even without a value on the stack, everytime with a different value printed.

I guess, it picks values from memory addresses and prints whatever there is.

Is this normal behaviour? I remember other Forth variants to print an error when the stack is empty.

Cool project nonetheless!

mczero80 avatar May 05 '21 11:05 mczero80

Hi, thanks for using my project! Yeah, I haven't written something to check when the stack is empty, that is a possibility. If you would be able to contribute a patch, I would greatly appreciate it. Otherwise I can take a look later.

siraben avatar May 05 '21 15:05 siraben

I don't feel qualified without more practice at coding. Would be happy if you take a look at it when you have time and still fun @coding 🙂

mczero80 avatar May 07 '21 15:05 mczero80