Post Reply 
Plus42 Equations, Preview Release
02-14-2022, 05:19 PM
Post: #339
RE: Plus42 Equations, Preview Release
(02-14-2022 03:46 PM)Thomas Okken Wrote:  
(02-14-2022 03:31 PM)Werner Wrote:  But in the RPN environment, list indexing is 0-based?
Cheers, Werner

Register numbers are 0-based, but matrix indices are 1-based, and, in the equation environment on the HP calculators, so are Σ-list indices. But I see CFLO lists are 0-based, so that would mean that FLOW() and #T() are incorrect as they are now, being 1-based?

Yes, they are ;-) CFLO's are stored in Nx2 matrices (or Nx1) , so accessing them with CF[I:1] necessarily starts at index 1 though. B
What are Σ-list indices?
I meant lists created with NEWLIST, like

GET:SIZES(A)*0+ITEM(A:I)

If you pass it a two-element list in A, I=1 returns the first element. But in RPN, if A is a list, you get the first element with SUBSTR(0,1). But that would mean that GETITEM would have to work differently on lists vs matrices.

Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Plus42 Equations, Preview Release - Werner - 02-14-2022 05:19 PM



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