function rot13 S repeat with i = 1 to length(S) get chartonum(char i of S) if it < 65 or it > 122 or (it > 90 and it < 97) then next repeat put char it - 64 of "NOPQRSTUVWXYZABCDEFGHIJKLM nopqrstuvwxyzabcdefghijklm" into char i of S end repeat return S end rot13