Post Reply 
Acces to a list
09-20-2015, 06:56 PM
Post: #1
Acces to a list
Hi all,

Need some help with my list.

L1 ={{1,2,3},{4,5,6},{8,9,1},{7,6,1}}

1. How to calculate the amount of elements (4)?
2. How to access every separate element of list L1

Thanks, for any help!

Cheers

Jan
Find all posts by this user
Quote this message in a reply
09-21-2015, 12:39 AM
Post: #2
RE: Acces to a list
1. SIZE
2. L1(<number>) to access further down inside, L1(<number>,<number>...) Ex: L1(2,3) returns 6 in your given list.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
09-21-2015, 05:54 AM
Post: #3
RE: Acces to a list
Hello,

Var[n] refers to:
if var is a list: the nth element of the list
if var is a string, the nth char of the string
if var is a vector, the nth element of the vector
if var is a matrix, the nth line of the matrix, or if n<0, the nth column
if var is an int, the nth bit of the int.

This works both in RCL and STO

var[n, m] refers to:
if var is a list: var[m] for the nth element of the list (parameter list can be up to 16 long!)
if var is a string, m chars starting at index n in the string
if var is a matrix, the element at pos n,mx
if var is an int, the m bit starting at pos n from the int

list(0):=val: adds at the end of the list

That should get you started.
Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)