Jump to content

24 game: Difference between revisions

m
→‎{{header|RPL}}: typo & comments
m (→‎{{header|RPL}}: typo & comments)
Line 10,259:
=={{header|RPL}}==
{{works with|HP|49/50}}
« '''IF''' DUP TYPE 9. ≠ '''THEN''' { } + <span style="color:grey">@ ''stack contains a number''</span>
'''ELSE'''
'''CASE''' OBJ→ SWAP 2. ≠ '''THEN''' DROP 0 '''END''' <span style="color:grey">@ ''stack contains a monadic operator''</span>
'''CASE'''
OBJ→ SWAP 2. ≠ "+-*/" SWAP →STR POS NOT '''THEN''' DROP 0 '''END''' <span style="color:grey">@ ''stack contains a forbidden dyadic operator''</span>
"+-*/" SWAP →STR POS NOT '''THEN''' DROP 0 '''END'''
'''END'''
<span style="color:blue">GET4</span> SWAP <span style="color:blue">GET4</span> +
'''END'''
» '<span style="color:blue">GET4</span>' STO <span style="color:grey">@ ''( 'expression' → { numbers } )''</span>
« 1 CF
1,151

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.