Вверх ↑
Ответов: 1321
Рейтинг: 37
#1: 2011-04-27 22:25:02 ЛС | профиль | цитата
Леонид,
code

unit HiAsmUnit;

interface

uses kol,Share,Debug,HIStreamConvertor;

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 count(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.
Результат

C:\Program Files\HiAsm\Elements\delphi\code\HiAsmUnit.pas(28) Error: For loop control variable must be simple local variable
C:\Program Files\HiAsm\Elements\delphi\code\HiAsmUnit.pas(28) Error: 'TO' expected but 'DO' found
C:\Program Files\HiAsm\Elements\delphi\code\HiAsmUnit.pas(30) Error: Incompatible types: 'Boolean' and 'procedure, untyped pointer or untyped parameter'
------------ Дoбавленo в 22.25:
То исправил
но
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 count(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.
C:\Program Files\HiAsm\Elements\delphi\code\HiAsmUnit.pas(28) Error: Undeclared identifier: 'count'
карма: 0

0