List - how can you select an item in a list (command

We're glad you came by, but you might find what you're looking for elsewhere.

TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.

Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.

Forum » Programming & Design / TI-83/84/+/SE Programming » List - how can you select an item in a list (command
Started by: navyfalcon navyfalcon
Date: 19 Mar 2008 04:49
Number of posts: 7
rss icon RSS: New posts
Summary:
I have a list of several numbers - how can I select a number in the list to multiply or add to or ...
List - how can you select an item in a list (command
navyfalcon navyfalcon 19 Mar 2008 04:49

I have a basic program with a list of 11 items (numbers). I want to select one at a time to square and put in another list.
part of program:

Input "L1=?", Str1
expr("{"+Str1->L1
For(I,1,dim(L1
End

Need to select each item and square it then put in a new list
I need another For statement to increment the list
but how do I select the number so I can square it and put it in another list
Thank You
falcon

by navyfalcon navyfalcon , 19 Mar 2008 04:49
Re: List - how can you select an item in a list (command
JoostinOnline JoostinOnline 19 Mar 2008 05:20

Why not just use L1^2->L2? That would square each number in the list and store the results in L2. To answer your question about selecting a single element to a list just type L1(1) for the first number in L1, L1(2) for the second number in L1, and so on.

by JoostinOnline JoostinOnline , 19 Mar 2008 05:20
Re: List - how can you select an item in a list (command
burr burr 19 Mar 2008 05:38

Yeah, you can do the 2 operation on the entire list at one time — there is no need to use a loop.

EDIT: Welcome to TI-Basic Developer!

Last edited on 19 Mar 2008 05:40 by burr
by burr burr , 19 Mar 2008 05:38
Re: List - how can you select an item in a list (command

Let's say your list is called tidev. And has the dimensions of 30. To locate the first number in the set, do this.

:LTIDEV(1)

To perform an operation on that value, store it to a variable, perform the operation, and then store the variable to the list. If you don't understand, I wrote it below.

:LTIDEV(1)->A
:A*2->LTIDEV(1)
by Programmingfreak Programmingfreak , 22 Dec 2011 13:51
Re: List - how can you select an item in a list (command
builderboy builderboy 22 Dec 2011 19:04

You do realize that this question was asked three and a half years ago right? It's generally considered bad forum manners to revive such old threads that really don't need to be revived.

by builderboy builderboy , 22 Dec 2011 19:04
Re: List - how can you select an item in a list (command

Oops.

Last edited on 22 Dec 2011 21:45 by Programmingfreak
by Programmingfreak Programmingfreak , 22 Dec 2011 21:45
Re: List - how can you select an item in a list (command
bigskii bigskii 10 May 2023 01:34

Oh

by bigskii bigskii , 10 May 2023 01:34
/forum/t-47786/list-how-can-you-select-an-item-in-a-list-command#post-
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /