Difference between revisions of "TI-BASIC:Number Or List"

From Learn @ Cemetech
Jump to navigationJump to search
(Initial automated import)
 
(Automated @@ correction)
 
Line 1: Line 1:
 
{{Template:TI-BASIC:Routine
 
{{Template:TI-BASIC:Routine
|picture=@@
+
|picture=
 
|summary=Determines whether an input is a number or list.
 
|summary=Determines whether an input is a number or list.
 
|input=''Ans'' - the number or list to examine
 
|input=''Ans'' - the number or list to examine
 
|output=''Ans'' - 1 if the input is a number, 0 if it is a list (see criteria below)
 
|output=''Ans'' - 1 if the input is a number, 0 if it is a list (see criteria below)
|variable= @@
+
|variable=  
 
|compatibility= TI-83/84/+/SE
 
|compatibility= TI-83/84/+/SE
 
|author= Zeda
 
|author= Zeda
|authors=@@
+
|authors=
|url=@@
+
|url=
|download=@@
+
|download=
 
}}
 
}}
  

Latest revision as of 22:13, 24 February 2016


Routine Summary

Determines whether an input is a number or list.

Inputs

Ans - the number or list to examine

Outputs

Ans - 1 if the input is a number, 0 if it is a list (see criteria below)

Variables Used


Calculator Compatibility

TI-83/84/+/SE Author

Zeda Download

No download provided.

As long as Ans is always contains more than one element and the second element is not twice that of the first, this will determine if Ans is a list or not:

Ans(2)=2Ans(1

If Ans is a number, this will always return 1, else if it is a list meeting the above criteria it returns 0.