Post Reply 
HP49-HP50 Lists of combination
12-19-2022, 03:10 PM
Post: #7
RE: HP49-HP50 Lists of combination
Perhaps using a CASE instead of nested IF statements makes reading easier:
Code:
«
  « → m s 
    « CASE
        m 1 ==
        THEN s 1 « 1 →LIST » DOLIST
      END
        m s SIZE ==
        THEN s 1 →LIST
      END
        m 1 - s TAIL ←C EVAL
        1 « s HEAD SWAP + » DOLIST
        m s TAIL ←C EVAL +
      END
    »
  » → ←C
  « ←C EVAL
  »
»
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP49-HP50 Lists of combination - Gil - 12-18-2022, 11:01 PM
RE: HP49-HP50 Lists of combination - Gil - 12-19-2022, 10:38 AM
RE: HP49-HP50 Lists of combination - Gil - 12-19-2022, 01:42 PM
RE: HP49-HP50 Lists of combination - Thomas Klemm - 12-19-2022 03:10 PM
RE: HP49-HP50 Lists of combination - Gil - 12-19-2022, 03:35 PM



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