i'm writing a program to keep all of my grades in and i want to add to a list in a certain file from inside the program. i would sure thank all the help i can get.
Adding To Lists
Started by
s509
, Apr 27 2005 01:19 PM
7 replies to this topic
#1
Posted 27 April 2005 - 01:19 PM
#2
Posted 27 April 2005 - 06:21 PM
There are only two ways to create a list from inside a program:
1.
2.
For example when you have some elements in List 2 and you want to add 5, you can do it this way:
Btw. I'd suggest you to store not any grade you get but maybe make a list with six entries (grade 1..6)and store how often you got it. E.g. 3x1, 7x2, 2x3 would be {3,7,2,0,0,0} and so on.
1.
{1,2,3,...}->List 1This one is static as the number of elements is fixed.
2.
Seq(f(var),var,start,end,step)->List 1This is flexible in the number of elements (the list will recieve (end-start)/step+1), and you also can initialise them with f(var), where var is the running variable (similar to a FOR - loop).
For example when you have some elements in List 2 and you want to add 5, you can do it this way:
List 2->List 3 Dim List2->A Seq(0,X,1,A+5,1)->List 2 For A->A To 0 Step -1 Do List 3[A]->List 2[A] Next
Btw. I'd suggest you to store not any grade you get but maybe make a list with six entries (grade 1..6)and store how often you got it. E.g. 3x1, 7x2, 2x3 would be {3,7,2,0,0,0} and so on.
#3
Posted 27 April 2005 - 06:52 PM
You can also do 12->Dim List 1 to create a list 1 with 12 elements
#4
Posted 18 May 2005 - 04:35 PM
Here's another couple of methods for appending an item to a list
that you might find interesting.
To append 77 to List 1 (matrix method):
Trn Augment(List->Mat(List 1),[ ->Mat A
Mat->List(Mat A,1)->List 1
If you prefer not to use up matrix memory then there is the
sequence method which runs slightly slower.
To append 77 to List 1 (sequence method):
1+Dim List 1
Seq(List 1 - (X=Ans, X, 1, Ans, 1->List 1
77->List 1[Ans
The above is an excerpt taken from:
http://members.lycos...html/lists.html
---
Roy F.A. Maclean, rfam AT lycos.co.uk
http://members.lycos.co.uk/rfam
that you might find interesting.
To append 77 to List 1 (matrix method):
Trn Augment(List->Mat(List 1),[ ->Mat A
Mat->List(Mat A,1)->List 1
If you prefer not to use up matrix memory then there is the
sequence method which runs slightly slower.
To append 77 to List 1 (sequence method):
1+Dim List 1
Seq(List 1 - (X=Ans, X, 1, Ans, 1->List 1
77->List 1[Ans
The above is an excerpt taken from:
http://members.lycos...html/lists.html
---
Roy F.A. Maclean, rfam AT lycos.co.uk
http://members.lycos.co.uk/rfam
#5
Posted 19 May 2005 - 02:51 AM
What is "Dim"
#6
Posted 19 May 2005 - 10:50 AM
it is the command that defines / returns the size of a List / Array:
Return size of List:
Dim List 1->A
and size of array:
Dim Array A->List 1
and set size of list:
5->Dim List 1
and size of array
{5,5}->Dim Array A
Cu huhn
#7
Posted 13 June 2005 - 10:19 PM
I seen the option your looking for but I don't have my calculator now. I think it was shift - setup/menu then look for selecting file number. You can change list files in your program with this menu.
#8
Posted 15 June 2005 - 09:39 PM
His question was how do you change list file numbers in a program. In the program editor press shift then press the menu/setup button then press F6 till you see list then select file file number you want to change too. Later in program do this again to change to another file list.
It will look this in program
File1
File3
It will look this in program
File1
File3
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users