Display variable and string on same line (TI-Basic)

后端 未结 1 1637
终归单人心
终归单人心 2021-02-15 07:05

In most programming languages, you can mix and match strings with variables during output. However, I can\'t seem to find a good way to do so. Here is my code:

P         


        
相关标签:
1条回答
  • 2021-02-15 07:47

    In ti-basic for the ti-83 the plus (+) is used to concatenate strings. Like this:

    Disp "foo"+" "+"bar"
    

    Will output:

    "foo bar"
    

    You must remember to convert numbers to strings using string() though:

    Disp "C=√("+string(c)+")"
    

    Will output:

    "C=√(34)"
    

    Disp "C=√("+c+")" (no string()) will throw an error.

    0 讨论(0)
提交回复
热议问题