Post Reply 
[SOLVED] DSRN (dog slow roman numerals)
06-16-2014, 05:07 AM
Post: #47
RE: DSRN (dog slow roman numerals)
(06-16-2014 03:40 AM)DavidM Wrote:  The algorithm in DM1/TK3 doesn't handle 0 or negative values properly.

This is the code I used for my HP-48 instead of \<< NDUPN DROP \>>:
Code:
\<<
  "" SWAP
  WHILE DUP 0 >
  REPEAT
    ROT ROT OVER +
    ROT 1 -
  END
  ROT DROP2
\>>

Wasn't particulary proud but handles both 0 and negative values correctly. Whatever that is.

Quote:I really want to like the list processing commands. This application is clearly not a good one for them, though.

Not sure about that. It has indeed to do with what we pass to DOLIST. But then just returning nothing instead of an empty list is a surprize to me as well.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: DSRN (dog slow roman numerals) - HP67 - 06-11-2014, 07:06 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 11:44 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 04:49 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-15-2014, 12:02 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-16-2014, 06:09 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 05:46 PM
RE: DSRN (dog slow roman numerals) - Thomas Klemm - 06-16-2014 05:07 AM



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