Unique characters: Difference between revisions
→{{header|RPL}}
Line 1,392:
=={{header|RPL}}==
{{works with|Halcyon Calc|4.2.7}}▼
≪ DUP SIZE → string length
≪ 1 length '''FOR''' n
Line 1,433 ⟶ 1,434:
DROP2
≫
‘UNCHR’ STO
===Shorter code but increased memory requirements===
≪ → strings
≪ { 255 } 0 CON 1 strings SIZE '''FOR''' j
strings j GET 1 OVER SIZE '''FOR''' k
DUP k DUP SUB NUM ROT SWAP DUP2 GET 1 + PUT SWAP
'''NEXT'''
DROP
'''NEXT'''
≫
"" 1 255 '''FOR''' j
'''IF''' OVER j GET 1 == '''THEN''' j CHR + '''END'''
'''NEXT'''
SWAP DROP
≫
‘UNCHR’ STO
{"133252abcdeeffd", "a6789798st", "yxcdfgxcyz"} UNCHR
▲{{works with|Halcyon Calc|4.2.7}}
{{out}}
<pre>
|