TI-89 HomeGames ArchiveTitanium GamesGames How ToProgramsFAQForumTI-89 WikiLinks

Inputting values to lists

 
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming
Author Message
Eolill



Joined: 21 Feb 2009
Posts: 1

PostPosted: February 21, 2009 4:43 PM    Post subject: Inputting values to lists Reply with quote

So, I feel rather dumb, but I can't figure out how to add an element to a list. On the old calculators it appeared to work with the store button (x --> L1), but if I write that, it thinks L1 is a variable, and not a list. I just want to add a number onto the list, and, if possible, check if a number is divisible by any of the elements on the list.
Back to top
View user's profile Send private message
jmurphy1337



Joined: 03 Jan 2010
Posts: 4

PostPosted: January 3, 2010 9:17 PM    Post subject: Reply with quote

In order to add on an extra number to a list, use the augment function.

augment({1,2},{3}) produces
{1 2 3}

As for seeing if a number is divisible by any elements in the list, use the mod function.

mod(8,{1,2,3}) produces
{0 0 2}

Meaning that 1 and 2 divide 8 with no remainder.
Back to top
View user's profile Send private message
Display posts from previous:    View previous topic : View next topic  
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Contact Us | Privacy Policy | Disclaimer | Trademarks

Copyright ©2006 All rights reserved.


Free Greeting Cards | Girly Myspace Layouts | Myspace Unblocker |