Post Reply 
Fizzbuzz, again
09-25-2017, 08:08 PM (This post was last modified: 09-25-2017 08:09 PM by Dave Britten.)
Post: #2
RE: Fizzbuzz, again
Under normal circumstances, you don't have to RCL variable values. Just do K rather than 'K' RCL, for example.

Here's a little quick-and-dirty version I banged out on my 48SX that demonstrates using a local subroutine, and doing more "on the stack".

Code:
\<<
  DUP2 SWAP - 1 +
  \<< DUP 3 MOD NOT "FIZZ" "" IFTE
    OVER 5 MOD NOT "BUZZ" "" IFTE
    + IF DUP SIZE THEN SWAP END DROP \>>
  \-> N FB
  \<< FOR C C FB EVAL NEXT N \->LIST \>>
\>>
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Fizzbuzz, again - brickviking - 09-25-2017, 09:45 AM
RE: Fizzbuzz, again - Dave Britten - 09-25-2017 08:08 PM



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