Post Reply 
DOSUBS with binary operations
05-15-2022, 01:44 PM
Post: #3
RE: DOSUBS with binary operations
That was quick!
Thanks for your reply.

For some reason I didn't think to consult the documentation for the HP-50g as well:
Quote:The number of lists, n, can be omitted when the first or level 1 argument is any of the following:
• A command.
• A program containing exactly one command (e.g. « DUP »)

Meanwhile I tried the example \<< DUP \>> with DOLIST and it doesn't work:

DOLIST Error:
Wrong Argument Count


However the following works:
Code:
{ 1 2 3 4 5 }
1
\<< DUP \>>
DOLIST

And we get the expected:

{ 1 1 2 2 3 3 4 4 5 5 }

The following also works:
Code:
{ 1 2 3 4 5 }
\<< -> u \<< u DUP \>> \>>
DOLIST

So HP-48G and HP-50g seem to behave slightly differently.
And you can consider me one of today's lucky 10,000.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: DOSUBS with binary operations - Thomas Klemm - 05-15-2022 01:44 PM



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