I need to be able to test if a list equals another list, but when I try it, It gives me a data type error!! The lists are the same length, so why does this happen??

Perhaps one of the lists is a real list and the other is a complex list?

You cannot check to see if a list equals another list. That would require checking to see if each element equals the corresponding element in the other list. On the homescreen, doing "L1=L2" will give either a true or false value (0 or 1) for each element. Obviously, if they are not the same dimension, it will throw an error.

So for example, if L1={3,1,4,1,5,9} and L2={3,1,4,7,1,9} then doing L1=L2 on the homescreen will give {1 1 1 0 0 1}

And this is why you cannot check to see if an entire list equals an entire list. However, if the dim of both the lists equaled 1, then this would work, but most of the time your lists will be more than 1 element long.

If you want to check if an entire list equals an entire list, you will most likely need to use a For() loop for all the elements of the list. So something like:

```
DelVar A
For(B,1,dim(L1))
If L1(B)=(L2(B
A+1->A
End
If A=dim(L1
(code)
```

assuming that the dim of L1 is equal to the dim of L2.

You'd probably want this instead:

```
If min(L1=L2
Then
```

*The Silver Phantom welcomes you*

Your Best Option is to rather just save your list to a matrix and then seeing if they are equal. this worked with my calc.

It works, but it's not the *best* option. Silver Phantom's answer works perfectly if the lists are the same size; otherwise you can just add an If dim(L1)=dim(L2:Then.

Going off of this, you can probably do the following without the Then's:

```
0
If dim(L1)=dim(L2
min(L1=L2
```

This will return 0 if lists are not the same and 1 if they are equal.