Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TI 83 Calculator String Programming
#1
Reply
#2
http://tibasicdev.wikidot.com/number-to-string

Seems pretentious and convoluted.
Code:
:"I HAVE "→Str1
:" DOLLARS"→Str2
:Prompt N
:{0,1→L₁
:{0,N→L₂
:LinReg(ax+b) Y₁
:Equ►String(Y₁,Str3
:sub(Str3,1,length(Str3)-3→Str3
:Disp Str1+Str3+Str2

Fatal flaw is that the line doesn't automatically break if it's too long, thus giving you
I HAVE 5 DOLLAR...
as your output.

Code:
:Disp Str1
:Disp N
:Disp Str2

A lot simpler, though you may run short on vertical space this way.
Reply
#3
You could use the Output function to specify the X and Y coordinates to display each piece. That way you wouldn't need concatenation.

It's quite unfortunate that TI-BASIC is the worst programming language ever made. Using linear regression and Equ->String to print a number? I'm amazed.
Reply
#4
I wanted to export a number, and a number of terms, into a Y= field. If the user input 5 for the N, it needs 5 terms. If they input 20, it needs 20. Joe's method works great for it, albeit time consuming.
This + limited naming of variables is making me hate TI Basic. :|
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)