How to create TI-BASIC input forms (TI-84 +)?

In the TI-BASIC programming language (specifically TI-84 +), how do you create input forms, such as those that are included in the default applications on TI-84 +.

The image presented here shows an example of what I'm trying to create: a menu that you can scroll through and enter several variables freely before executing a function

In addition, is it possible to dynamically update this menu when entering variables?

+5
source share
2 answers

In the TI-BASIC programming language (specifically TI-84 +), how do you create input forms, such as those that are included in the default applications on TI-84 +.

There are many ways to request input in your program:

  • Prompt : prompts for input and stores it in a variable. For example, Prompt A The easiest way to ask for input, but not very visually appealing.

  • Input : similar to Prompt, except that now you can include text in the input. For example, Input "What is your name?",A

  • A menu ( : multiple entry input, and each selection connected to an Lbl marker somewhere else in the script. For example, an error screen with the / goto exit options that you probably saw. For example, Menu("Are you a boy or a girl?","Boy",B,"Girl",G) .

  • getKey : checks if a certain key is pressed, and returns True (1) if that key is pressed. For example, getKey 105 . See here for which numbers correspond to each key.

The image presented here shows an example of what I'm trying to create: a menu where you can scroll and enter several variables freely before executing the <a5> function

I am afraid that this is not possible in programs. You can either enter several inputs, or you may be interested in looking at creating applications.

In addition, is it possible to dynamically update this menu when entering variables?

If you are talking about text on top of a screenshot, yes you can; just put the Disp command or something after each line of input so that it continuously overwrites the text above with new text after entering the variable.

+3
source

You have established a fairly high order of filling TI-Basic. user3932000 is correct; There is no built-in function to create the input form of the type you are requesting.

However, there is nothing to stop you from using this interactive interface. Creating this kind of interface from scratch will be a time-consuming process for you, and a memory-consuming press for your calculator, so it does not cost most of the time. There is no template code in which you insert the variables to get the desired results, but you may be able to model it after this quadratic solver that I wrote.

 ClrHome a+bi Output(1,1," QUADRATIC Output(2,1," AX²+BX+C Output(3,1,"ZEROS: Output(6,1,"A= Output(7,1,"B= Output(8,1,"C= DelVar YDelVar D " →Str1 While Y≠105 getKey→Y If Ans Then Output(X,4,Str1 Output(3,7,Str1+Str1+Str1+" End X+(Ans=34)-(Ans=25 If Ans<6:8 If Ans>8:6 Ans→X Output(Ans,16,"◄ D(Y≠45→D If Y=25 or Y=34 sum({A,B,C}(X={6,7,8→D If Y=104:⁻D→D 10not(Y)+Y(102≠Y)-13int(Y/13(2>abs(5-abs(5-abs(Y-83 If Ans≤9 D10+Ans-2Ans(D<0→D If X=6:D→A If X=7:D→B If X=8:D→C If A Then 2ˉ¹Aˉ¹(⁻B+{1,⁻1}√(B²-4AC Else If B Then ⁻C/B Else If C Then "No Zeros Else "All Numbers End End End Output(3,7,Ans Output(6,3,A Output(7,3,B Output(8,3,C End ClrHome Ans 

Here's a GIF of what he does for you.

With a bit more work. This code can be used on the Graph screen instead of the main screen, providing more options in terms of layout and design.

+5
source

Source: https://habr.com/ru/post/1214214/


All Articles