code
unit HiAsmUnit;
interface
uses kol,Share,Debug,HIStreamConvertor,Windows;
type
THiAsmClass = class(TDebug)
private
public
Str,Result:THI_Event;
procedure doCode(var _Data:TData; Index:Word);
end;
implementation
procedure THiAsmClass.doCode;
const
cod:array[1..3] of string[4]=('a','c','n');
tran:array[1..3] of string[4]=('р','и','g');
var s,st,hst:string;
i,k,j:integer;
begin
s:=ReadString(_Data,Str);
for i:=1 to Length(s) do
begin
for j:=1 to Length(cod) do k:=Pos(s[i],cod[j]);
If k>0 then st:=st+tran[k]
else st:=st+s[i];
end;
_hi_onEvent(Result,st);
end;
end.
interface
uses kol,Share,Debug,HIStreamConvertor,Windows;
type
THiAsmClass = class(TDebug)
private
public
Str,Result:THI_Event;
procedure doCode(var _Data:TData; Index:Word);
end;
implementation
procedure THiAsmClass.doCode;
const
cod:array[1..3] of string[4]=('a','c','n');
tran:array[1..3] of string[4]=('р','и','g');
var s,st,hst:string;
i,k,j:integer;
begin
s:=ReadString(_Data,Str);
for i:=1 to Length(s) do
begin
for j:=1 to Length(cod) do k:=Pos(s[i],cod[j]);
If k>0 then st:=st+tran[k]
else st:=st+s[i];
end;
_hi_onEvent(Result,st);
end;
end.
Теперь переводит начиная с 3-го
n = р
Почему?