Anonymous user
Rot-13: Difference between revisions
m
→{{header|An alternate approach}}: Code cleanup of 3rd S-BASIC approach
imported>KayproKid (→{{header|S-BASIC}}: added additional approach) |
imported>KayproKid m (→{{header|An alternate approach}}: Code cleanup of 3rd S-BASIC approach) |
||
Line 5,638:
</pre>
Still a third approach makes use of S-BASIC's awkward (and
<syntaxhighlight lang = "basic">
var tr = string:127
rem - set up translation table
tr = space$(31) + " !" + chr(34) + "#$%&'()*+,-./0123456789" + \▼
rem -
▲tr = space$(31) + " !" + chr(34) + "#$%&'()*+,-./0123456789"
▲tr = tr + ":;<=>?@NOPQRSTUVWXYZABCDEFGHIJKLM[\]^_`"
▲tr = tr + "nopqrstuvwxyzabcdefghijklm{|}~"
var plain, encrypted = string
s = "The quick brown fox jumps over the lazy dog."▼
▲s = xlate(s,tr)
print "
print "
print "Restored : "; rot13(encrypted)
end
|