Spiral matrix: Difference between revisions
m
→{{header|RPL}}: typo
m (→{{header|RPL}}: comments) |
m (→{{header|RPL}}: typo) |
||
(One intermediate revision by the same user not shown) | |||
Line 4,922:
{{works with|RPL|HP48-R}}
« { 0 1 } → n step
« { 1 1 } n DUP 2 →LIST -1 CON <span style="color:grey">@ empty cell = -1</span>
OVER j PUT
DUP2 SWAP step ADD
'''IF IFERR''' GET '''THEN''' DROP2 1 '''ELSE''' -1 ≠ '''END'''
'''THEN''' step
SWAP step ADD SWAP
'''NEXT'''
|