For Casio Graphic Calculators 9750/9850/9950 and compatibles

Dynamic Lists

(Note that on the Algebra FX 2.0 and the 9860 you can append a new entry simply by assigning a value.
e.g. 77->List 1[5] would work if List 1 already had 4 entries and you can concatenate two lists simply by using the Augment command.)

Appending an item to a list

To append 77 to List 1 (matrix method):
Trn Augment( Trn List->Mat(List 1),[[77->Mat A
Mat->List(Mat A,1)->List 1

This has the disadvantage that it requires a spare matrix, taking up more memory than necessary. Because of this, you may prefer instead to use the following method:

To append 77 to List 1 (sequence method):

1+Dim List 1
Seq(List 1[X - (X=Ans, X, 1, Ans, 1->List 1
77->List 1[Ans

This has a speed disadvantage when compared to the matrix method however.

Concatenating two lists

Concatenating two lists is a more complicated version of the append function. Similarly, there are two methods, a matrix method and a sequence method.

To concatenate List 1 and List 2 and store the result in List 3 (matrix method):

Trn Augment(Trn List->Mat(List 1),Trn List->Mat(List 2)->Mat A
Mat->List(Mat A,1->List 3

To concatenate List 1 and List 2 and store the result in List 3 (sequence method):

Dim List 1
Seq(List 2[X - Ans + (X<=Ans)(1 - X + Ans](X>Ans) + (X<=Ans)List 1
[X - (X>Ans)(X - 1, X, 1, Ans + Dim List 2, 1->List 3

Inserting an item into a list

To insert 77 into the 5th place in List 1:
Seq(List 1[X - (X > 5, X, 1, Dim List 1 + 1, 1->List 1
77->List 1[5

Removing an item from a list

To delete the 5th item in List 1:
Seq(List 1[X+(X>=5, X, 1, Dim List 1 - 1, 1->List 1
Note that you can't delete the first item in a list if it is the only item in the list. ClrList clears all lists and { } -> List 1 gives a syntax error. You might want to keep a dummy value in the first item.

To delete the last item in a list:

Seq(List 1[X, X, 1, Dim List 1 - 1, 1->List 1

by Roy Maclean and Tom Lynn 1997
Errata: In the 'Appending an item to a list' section
Trn Augment(List->Mat(List 1),[[77->Mat A
was missing a 'Trn' command and now reads:
Trn Augment(Trn List->Mat(List 1),[[77->Mat A
Corrected 18th May 2006.
This page updated 16th October 2006.
rfamgm at gmail
http://www.spiderpixel.co.uk/caspro