HP Forums
Free42 LNSTK debug - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: Free42 LNSTK debug (/thread-16394.html)



Free42 LNSTK debug - Werner - 03-01-2021 07:12 AM

When debugging a program with LNSTK, executing RTN from the keyboard does not return to 4STK mode.
Cheers, Werner


RE: Free42 LNSTK debug - Thomas Okken - 03-01-2021 11:57 AM

Yes. Executing RTN from the keyboard deletes all local variables and restores the IJ pointers if the indexed matrix was hidden by a local variable, but it does not undo the effects of FUNC, L4STK, or LNSTK. I think doing so would get messy, and produce surprising results when the user doesn't expect it...


RE: Free42 LNSTK debug - Werner - 03-01-2021 01:03 PM

I would argue that the ones using those functions know what they are doing ;-)
After all, your local variables will disappear as well, why not your local dynamic stack?
I agree that FUNC should NOT be taken into account when executing a manual RTN, though.
Werner


RE: Free42 LNSTK debug - Thomas Okken - 03-01-2021 02:14 PM

I could make it restore the stack mode, but without restoring the stack contents... I considered that possibility while implementing LNSTK and L4STK, but I don't remember why I didn't go ahead and do it. It seems like a pretty reasonable thing to do.


RE: Free42 LNSTK debug - Thomas Okken - 03-01-2021 04:58 PM

I made the change. It will be in the next release of Free42 and the next test build of Plus42.


RE: Free42 LNSTK debug - Werner - 03-01-2021 06:14 PM

Thanks, Thomas!
Werner