1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28:
| const Buchstabe : Array[1..26] of Char = ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
function decode(s: string; Anzahl: Integer): string; var i: Integer; begin for i := 1 to Length(s) do begin if UpCase(s[i]) in ['A'..Buchstabe[26 - Anzahl]] then begin Inc(s[i], Anzahl); end else begin if UpCase(s[i]) in [Buchstabe[27 - Anzahl]..'Z'] then begin Dec(s[i],26 - Anzahl); end; end; end; Result := s; end; |