Ver Mensaje Individual
  #4  
Antiguo 14-05-2016
Avatar de BDWONG
BDWONG BDWONG is offline
Miembro
NULL
 
Registrado: nov 2013
Posts: 113
Reputación: 11
BDWONG Va por buen camino
Hola que version de delphi estas utilizando?
Hice unas pruebas en delphi 2010 y no tuve ningun problema

Código Delphi [-]
function cifrar_Descifrar(const value:string):string;
var
CharIndex:Integer;
begin
  Result := Value;
  for CharIndex := 1 to Length(Value) do
    Result[CharIndex] := chr(not(ord(Value[CharIndex])));
end;


var
msg:string;
begin
   msg:='Hello world C';

   msg:=cifrar_Descifrar(msg);
   Writeln(msg);

   msg:=cifrar_Descifrar(msg);
   Writeln(msg);

   Readln;
end.

Saludos
Responder Con Cita