Is there a way, in pure Basic, to do the equivalent of a call... execute subroutine code, without disrupting any For/While loops you are in?
The easiest and most correct way to call a subroutine in TI-BASIC is to simply use prgmXXXX. If you're using Hybrid BASIC, you can copy an archived subprogram to a temporary program and call it.

Edit: An alternative would be to Goto out, then use a Goto at the end of the subroutine to jump back to a Lbl right after the Goto inside the loop, like this:
Code:
:For(X,1,10
:Goto DX
:Lbl RX
:End
:Return
:
:Lbl DX
:Disp X
:Goto RX
Here's a screenshot of the program. Anyone who wants to beta test it, please private message me and I'll send it to you.

BUGS I KNOW OF: Dividing with a 1-term denominator gives a Domain error on the deltaList line.
Also, the program currently discards any remainders from division. If someone can advise me on how to use it, I'll try to.


+++++++++++++++++++++++++++
Update!

2.0 RC1 Division bug resolved. Error catching for divide by zero added. Trailing parenthesis removed where possible. Zeroes algorithm improved. Older version used the solve() built in command. This version uses a modified rational zeroes test ( x = p/q )

For anyone wishing to beta test, the link is https://www.omnimaga.org/ti-z80-calculator-projects/polynomials-all-in-one-math-tool-upgraded%21/?action=dlattach;attach=23838.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement