Sub Rot13 EncodedString = "" For i = 1 To Text.GetLength(String) Code = Text.GetCharacterCode(Text.GetSubText(String, i, 1)) If Code >= 65 And Code <= 90 Then EncodedCode = Code + 13 If EncodedCode > 90 Then EncodedCode = 64 + EncodedCode - 90 EndIf ElseIf Code >= 97 And Code <= 122 Then EncodedCode = Code + 13 If EncodedCode > 122 Then EncodedCode = 96 + EncodedCode - 122 EndIf Else EncodedCode = Code EndIf EncodedString = EncodedString + Text.GetCharacter(EncodedCode) EndFor EndSub String = "Rosetta Code" Rot13() TextWindow.WriteLine(EncodedString)