Post Reply 
RPL programming questions
02-19-2014, 05:15 PM
Post: #12
RE: RPL programming questions
(02-19-2014 02:15 PM)HP67 Wrote:  I may have misread David's comments but I thought he posted times for his User RPL version using local variables. That's what I intended to ask about. David said "My 50g gives times of 23 secs for TGLO2 and 21 secs for TLOC2" and I was comparing that to Peacecalc's stack example where Peacecalc said "this proggie create five values on stacklevel one to five and in the loop these variables are recalled by PICK and immediately afterwards deleted." That took 26 seconds.
Hmm. I'm not sure what to make of that either.
(02-19-2014 02:15 PM)HP67 Wrote:  When you say the calculator has to scan through all the locals, I suppose you mean there is a linked list or table of locals. I was expecting a hash would have been used for this. I'm going to read up on as much internals doc as I can find. Thanks again!
Yes it's a table. See section 13 of RPLMAN.DOC for a detailed explanation of temporary variables and environments. In getting to know the RPL design, it seems to me that space was at a premium and they didn't everything they could to save it. A hash would have taken more space.
(02-19-2014 02:15 PM)HP67 Wrote:  [Starting with local variables] sounds pretty sensible although I find I don't like the nesting requirement and having to have something on the stack to create a local variable [which] is a little opposite of the way I would usually code something-
Having something on the stack is just a way to provide an initial value for the variable. If you want to create all your locals at the beginning then just push a bunch of zero's on the stack and create them all. You can store the meaningful values at the appropriate place in the code.

Dave
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RPL programming questions - HP67 - 02-17-2014, 01:54 PM
RE: RPL programming questions - peacecalc - 02-17-2014, 03:10 PM
RE: RPL programming questions - Joe Horn - 02-18-2014, 01:06 PM
RE: RPL programming questions - HP67 - 02-18-2014, 01:39 PM
RE: RPL programming questions - peacecalc - 02-18-2014, 07:15 PM
RE: RPL programming questions - DavidM - 02-18-2014, 11:31 PM
RE: RPL programming questions - HP67 - 02-19-2014, 09:52 AM
RE: RPL programming questions - HP67 - 02-19-2014, 02:15 PM
RE: RPL programming questions - David Hayden - 02-19-2014 05:15 PM
RE: RPL programming questions - HP67 - 02-20-2014, 03:27 PM
RE: RPL programming questions - DavidM - 02-19-2014, 05:23 PM
RE: RPL programming questions - HP67 - 02-20-2014, 03:40 PM
RE: RPL programming questions - DavidM - 02-20-2014, 04:10 PM
RE: RPL programming questions - peacecalc - 02-19-2014, 04:15 PM
RE: RPL programming questions - HP67 - 02-20-2014, 04:36 PM
RE: RPL programming questions - RMollov - 02-24-2014, 12:47 PM



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