Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

TI-Basic 84 Programming/Input

From Wikibooks, open books for an open world
<TI-Basic 84 Programming
Thelatest reviewed version waschecked on27 April 2022. There aretemplate/file changes awaiting review.

Input

[edit |edit source]

Input,PRGM:I/O:1 is a command which will display a string, and will wait for a value to be entered. It will then store that value into the provided variable once ENTER is pressed. If the only argument is a variable, then a question mark will be displayed instead of the string. And if no arguments are provided, then a cursor on the graph screen will be used to define coordinates at a given location to the variables X and Y.

Syntax: Input

[edit |edit source]
:Input [string],''var''
  • Wherestring is either a literal string or string variable which is displayed to help determine appropriate input value
    • Ifstring is not given, then a question mark is displayed in its place
    • Ifstring is used, thenvar must also be used
  • Wherevar is a variable type of any {unverified} which data is stored to
  • If no argument is specified, the command will display a movable cursor on the graph screen, where when enter is pressed, the current X-coordinate of the cursor will be stored to the variable X, and the current Y-coordinate stored to the variable Y

Ex: With String Title

[edit |edit source]
Input "PLEASE ENTER VALUE: ",X
PLEASE ENTER VALUE: 5
*The value of 5 would be stored to X.

Ex: Without String Title

[edit |edit source]
Input X
?5
*The value of 5 would be stored to X.


Ex: Without Arguments

[edit |edit source]
Input
* If the graph screen cursor was at 3.5 for X, and 6.2 for Y, then 3.5 would be stored to X and 6.2 stored to Y.

Prompt

[edit |edit source]
:Promptvar[,var2][,var3][,var4][,…varN]
  • Wherevar2,var3,var4, though tovarN are all optional arguments. The number of arguments is only limited by available memory. There needs to be at least one argument for it to work.
    • Each argument must be a variable name.
  • For each argument, Prompt will wait while a value is entered. Once Enter is pressed, the value will be stored to the associated variable. Then Prompt will continue on to the next argument until the end.


Ex: Two Numbers

[edit |edit source]
Prompt X,Y
X=?5Y=?7
*The X would have the value of 5 stored to it, and 7 would be stored to Y.

Ex: Other Variable Types

[edit |edit source]
Prompt Str1,L2
Str1=?"ABC"L2=?{1,2,3}
*This time, a string and a list were the variable types used.

 

using VARS you can set and pick functions Y1(requested value) 

Y-VARS Example solves for v Note: add quotes " " for equation you can also predefined equation in Y=

using VARS you can set and pick functions Y1(requested value)Template:Bcode:Y-VARS Example solves for v Note: add quotes " " for equation you can also predefined equation in Y=

Previous:Output
Next:Conditional Functions
Table of Contents:TI-Basic 84 Programming

Retrieved from "https://en.wikibooks.org/w/index.php?title=TI-Basic_84_Programming/Input&oldid=4051918"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp