TI 83/84
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWARETI 83/84
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!

Download and Activate to enter!
Receive the tools necessary to be the rock star of your field. Our 12-month program teaches you the evolving world of multi-channel marketing as well as the complex issues and opportunities found in the industry.
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today. .

Download to Enter | Contest Rules

Learn More!

Tutorials | Forums

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old May 20th, 2011, 07:50 PM
BobaFett2040 BobaFett2040 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: May 2011
Posts: 2 BobaFett2040 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 33 sec
Reputation Power: 0
Varying variables

I'm trying to make an inventory program for my TI-83 Calculator. What I need it to do is to prompt a user for the number of items, and create prompts for each one.

Example:

Number of Items:
User inputs, say 4.
The program then asks for the value of 4 items, as the program only created 4 variables.

Is that possible outside of using assembly?

Reply With Quote
  Trader Rating: 0 · #2  
Old May 21st, 2011, 10:31 PM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Mufinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 330 MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level)MufinMcFlufin User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Days 3 h 29 m 28 sec
Reputation Power: 113
Quote:
Originally Posted by BobaFett2040
I'm trying to make an inventory program for my TI-83 Calculator. What I need it to do is to prompt a user for the number of items, and create prompts for each one.

Example:

Number of Items:
User inputs, say 4.
The program then asks for the value of 4 items, as the program only created 4 variables.

Is that possible outside of using assembly?
You'll want to use a List, commonly known as an Array in other programming languages, except with one dimension. A list is a collection of numbers, with one dimension, much like what one would normally think of when you say list.

Because a List is a one dimensional object or variable, to store or call from a list, you need to specify to or from which element of the list. If you don't specify, then it will assume you're trying to replace the entire list. The calculator has a few built in lists, of which being L1 (List 1) through L6 (List 6). You can find these lists on the number pad of your calculator, after pressing [2nd].

Another thing to specify before going on, a list require dimensions. It cannot hold an infinite number of variables, and is limited either by memory, or specified dimensions.

In TI BASIC, a list by default will not exist. Even if it does exist, it by default will have dimensions of 0, meaning it has no slots for variable placement. Before you can use a list, you must define it, and then set it's dimensions. Most often you can do both of these in one step, so we will.

Here's a small code, where the program set's L1's dimensions to 5, meaning there are 5 elements where you can store variables. Then after setting the dimensions, it will store the value 2 into the first element of L1, 3 into the second, etc.
Code:
5->dim(L1
2->L1(1
3->L1(2
10->L1(3
6->L1(4
0->L1(5


You can also use variables to store dimensions, values, and values into variable elements. Here's an example:
Code:
Input "dim(",A
A->dim(L1
Input "L1(1)=",B
B->L1(1
Input "1=L1(C)",C
1->L1(C


Now given you don't input invalid dimensions (negative, imaginary, or non-integer number, or if it exceeds the set dimensions, applies to C, and B if A is 0) then it will work properly.

You can use this for the code you were asking for.

Now, I can't cover all of the information, so if you want to learn more about lists, then here's a link to an article with more information.
__________________
TI BASIC Tutor

Reply With Quote
  Trader Rating: 0 · #3  
Old May 23rd, 2011, 07:58 AM
BobaFett2040 BobaFett2040 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: May 2011
Posts: 2 BobaFett2040 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 33 sec
Reputation Power: 0
Thanks. I'll check it out first chance I get.

Quote:
Originally Posted by MufinMcFlufin
You'll want to use a List, commonly known as an Array in other programming languages, except with one dimension. A list is a collection of numbers, with one dimension, much like what one would normally think of when you say list.

Because a List is a one dimensional object or variable, to store or call from a list, you need to specify to or from which element of the list. If you don't specify, then it will assume you're trying to replace the entire list. The calculator has a few built in lists, of which being L1 (List 1) through L6 (List 6). You can find these lists on the number pad of your calculator, after pressing [2nd].

Another thing to specify before going on, a list require dimensions. It cannot hold an infinite number of variables, and is limited either by memory, or specified dimensions.

In TI BASIC, a list by default will not exist. Even if it does exist, it by default will have dimensions of 0, meaning it has no slots for variable placement. Before you can use a list, you must define it, and then set it's dimensions. Most often you can do both of these in one step, so we will.

Here's a small code, where the program set's L1's dimensions to 5, meaning there are 5 elements where you can store variables. Then after setting the dimensions, it will store the value 2 into the first element of L1, 3 into the second, etc.
Code:
5->dim(L1
2->L1(1
3->L1(2
10->L1(3
6->L1(4
0->L1(5


You can also use variables to store dimensions, values, and values into variable elements. Here's an example:
Code:
Input "dim(",A
A->dim(L1
Input "L1(1)=",B
B->L1(1
Input "1=L1(C)",C
1->L1(C


Now given you don't input invalid dimensions (negative, imaginary, or non-integer number, or if it exceeds the set dimensions, applies to C, and B if A is 0) then it will work properly.

You can use this for the code you were asking for.

Now, I can't cover all of the information, so if you want to learn more about lists, then here's a link to an article with more information.

Reply With Quote
  Trader Rating: 0 · #4  
Old June 1st, 2011, 08:35 AM
PAR PAR is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Sep 2008
Posts: 41 PAR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 29 m 51 sec
Reputation Power: 4
BobaFett2040, I guess this code will be usefull.

Code:
Input "ITEMS",A
A->dim(L1
Ipart(Abs(A))->A
For (X,1,A)
Output (1,1,”ITEM-NUMBER=)
Output (1,13,A)
Input "DATA=",B
B->L1(X
Output (5,6,”[OK]
Pause
CrlDraw
End

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWARETI 83/84 > Varying variables


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
     
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 11 - Follow our Sitemap
LOADING INFUSIONSOFTLOADING INFUSIONSOFT 1debug:overlay status: OFF
overlay not displayed overlay cookie defined: TI_CAMPAIGN_1012_D OVERLAY COOKIE set:
status off