Problem with a list in CAS-program
|
10-30-2017, 09:08 AM
Post: #19
|
|||
|
|||
RE: Problem with a list in CAS-program
The HP Prime wiki has a CAS vs HOME article linked to from the Programming Documentation section and in there it says:
Indexing in HP Basic is done using () braces, as in L1(5). In CAS, () can be used with a constant index in read only mode, but when a variable index is used, due to parsing issues (it thinks L1(x) is a function call), you must use [] braces instead, as in L1[i]. So, it is recommended if in CAS mode or in a CAS program, it is best to use [] to index always. This applies to Lists, Matrices and Vectors (1D Matrix). In XCas, lists, matrices and vectors are all lists. Note that XCas uses [] always anyway, so this keeps the Prime's CAS compatible with XCas. http://www.wiki4hp.com/doku.php?id=prime:start |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)