Post Reply 
HP48 programming: use values from stack in expression
12-01-2018, 02:06 PM (This post was last modified: 12-01-2018 09:51 PM by Thomas Klemm.)
Post: #6
RE: HP48 programming: use values from stack in expression
(12-01-2018 05:05 AM)Giuseppe Donnini Wrote:  
Code:
\<< 1 GET                             @ Get unevaluated function from list

We don't need that step as EVAL takes care of the list:

'a'
'b'
{ + }
EVAL
'a+b'

Nice solution, by the way. I must admit I wasn't aware of neither ↑MATCH nor ↓MATCH.

I couldn't come up with a simple way to create something like this map based on 2 and 3:
Code:
{ { a 2 } { b 3 } }

But that allowed us to extract the repeated code and use DOLIST:

'a+b'
{ { a 2 } { b 3 } }
1
« ↑MATCH DROP »
DOLIST
'2+3'

Any suggestions on how to do that?

Or then rather use STREAM:

{ 'a+b' { a 2 } { b 3 } }
« ↑MATCH DROP »
STREAM
'2+3'

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


Messages In This Thread
RE: HP48 programming: use values from stack in expression - Thomas Klemm - 12-01-2018 02:06 PM



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