Top three calculators ?
|
04-05-2018, 10:16 AM
Post: #47
|
|||
|
|||
RE: Top three calculators ?
(04-05-2018 08:37 AM)pier4r Wrote:(04-05-2018 07:42 AM)Pekis Wrote: Intuitive RPL, is it a joke ? But I think no one can deny that the mind can't figure instantly what all these stack operations are doing in RPL (and RPN), and you'll end up documenting with pseudo-code tasting like ... BASIC: Day of week: RPL << ROT 2 - IF DUP 0 < THEN 12 + SWAP 1 - SWAP END 3 ROLLD 100 / DUP FP 100 * SWAP IP DUP 4 / IP SWAP 2 * - SWAP DUP 4 / IP + + + SWAP 2.6 * .2 - IP + 7 MOD { "Sunday" "Monday" "Tuesday" "Wednesday" "Thrusday" "Friday" "Saturday" } SWAP 1 + GET >> Basic: Function ZellerDoW$(yr, mo, dy) m = mo - 2 if m<1 then m = m + 12 yr = yr - 1 end if c = int(yr/100) d = yr - 100*int(yr/100) f = int(2.6*m - 0.2) + dy + d + int(d/4) + int(c/4) + 5*c f = f - 7*int(f/7) dow$ = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday" ZellerDoW$ = word$(dow$, f+1) end function |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 26 Guest(s)