Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculators Ti BASIC User defined fucntion use in a program

  1. Mar 13, 2010 #1
    I am trying to figure out why Ti BASIC is the worst language ever. Every other language, if you want to use a user defined function within a user defined program, you simply write the function above (or below) the sub routine and then you can call it to your hearts delight...why is Ti BASIC failing me here? (I am using Ti89 Titanium.)


    All I want to do is a simple test here. Here is a user defined function that simply take an argument and then returns that argument (and this works if I type it directly into my calculator)

    Code (Text):

    Func
    newdisp(stuff)
    Return Stuff
    EndFunc
     
    Now I want to do a simple test program that calls newdisp and uses it

    Code (Text):

    ()
    Prgm
    newdisp(100)
    EndPrgm
     
    So it should just display '100' on the home screen. I would think that the structure of the program would be something like


    Code (Text):

    Func
    newdisp(stuff)
    Return Stuff
    EndFunc

    ()
    Prgm
    newdisp(100)
    EndPrgm

     

    or maybe

    Code (Text):

    ()
    Prgm
    newdisp(100)
    EndPrgm

    Func
    newdisp(stuff)
    Return Stuff
    EndFunc
     
    But if this worked I would not be here......the above to codes I am writing in Ti GraphLink and then sending to my calculator.

    Any thoughts?
     
  2. jcsd
  3. Mar 13, 2010 #2
    Any ideas on this one?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Ti BASIC User defined fucntion use in a program
  1. TI-83 asm programming (Replies: 5)

  2. TI-86 Text Program (Replies: 4)

  3. Emag program for ti 89 (Replies: 0)

Loading...