Author Topic: TI basicsh-luna  (Read 4972 times)

0 Members and 1 Guest are viewing this topic.

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
TI basicsh-luna
« on: August 21, 2011, 11:03:28 am »
Well, I am trying to do a small program [sorry guys, but isn't a game] it is for testing the convergence of series..

And I was wondering if I could do this in a colorful, and beautiful way with lua, but, is possible to call a TI-Basic program within lua code:

I mean like:

function convergence.power()
   callmyBasicPrgm()
end

or if possible:
Code: [Select]
function convergence.power()
Local rterm,aterm,sumv
        :clrio
        :Try
           :lim((equ(x))^(((1)/(x))),x,∞,1)→rterm
        :Else
        :If errornum=800 Then:
        :(...)
        :Return 0
end

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: TI basicsh-luna
« Reply #1 on: August 21, 2011, 11:06:10 am »
I believe that you can run single lines of TI-BASIC code, but not full programs (for example, loops and jumps are not supported).

Offline NecroBumpist

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 130
  • Rating: +14/-5
  • Master of Lua
    • View Profile
Re: TI basicsh-luna
« Reply #2 on: August 21, 2011, 11:06:59 am »
There's a math.eval() function for interacting with TI-Basic, so you might be able to call a pre-existing function from that.

/speculations.
Developing Lua scripts for the NSpire ?
Check out the Necrotorium
Need a few routines to run faster ? Checkout the MODS Lua Assembly Toolkit.
Need to save space for your scripts ? Checkout LuaSrcDiet

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: TI basicsh-luna
« Reply #3 on: August 21, 2011, 11:39:19 am »
For now you can't launch a TI-Basic program, but a TI-Basic function, yes (with math.eval that works exactly as expr() in TI-Basic).

The return value of math.eval() is the return value of the expression.

For example : a = math.eval("remain(100,6)")
a will be 4
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
Re: TI basicsh-luna
« Reply #4 on: August 21, 2011, 11:58:00 am »
Ok. Thank you, all, for the replies ..

[=

Offline Loulou 54

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 165
  • Rating: +39/-0
    • View Profile
    • Mes programmes sur TI bank.
Re: TI basicsh-luna
« Reply #5 on: August 21, 2011, 04:49:00 pm »
I believe that you can run single lines of TI-BASIC code, but not full programs (for example, loops and jumps are not supported).
Yes Loops, and Goto-Label are supported ! Even Try:Else:EndTry function for example. :)
Some of my program available here.. :)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir2&id=1471

     

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
Re: TI basicsh-luna
« Reply #6 on: August 21, 2011, 05:07:40 pm »
I believe that you can run single lines of TI-BASIC code, but not full programs (for example, loops and jumps are not supported).
Yes Loops, and Goto-Label are supported ! Even Try:Else:EndTry function for example. :)

But I have to do they in math.eval() or how can I access these functions?

Offline Loulou 54

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 165
  • Rating: +39/-0
    • View Profile
    • Mes programmes sur TI bank.
Re: TI basicsh-luna
« Reply #7 on: August 22, 2011, 03:35:09 pm »
You just have to paste your basic code into "" :
(Use ":" for a new line of code, as you can do in the calculus line)
For example :

math.eval("0=:c:While c<10:c+1=:c:EndWhile")

And you can put all other structures like Lbl, For, Loop, Try, ... :)
Some of my program available here.. :)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir2&id=1471