function ReadData(var Data:TData; PointData:THI_Event; Def:PData):TData;
begin
if Assigned(PointData.Event) then
begin
Result.Data_type := data_null;
//Result.Next := nil;
_hi_OnEvent(PointData,Result);
end
else if(Def = nil)or( Def.data_type = data_null ) then
begin
Result := Data;
{$ifdef MT_ENABLED}
if Data.ldata <> nil then
Data := Data.ldata^
else
{$endif}
Data.data_type := data_null;
end
else Result := Def^;
end;
.....
begin
Result := Data;
{$ifdef MT_ENABLED}Result.ldata := nil;
if Data.ldata = nil then Data.data_type := data_null;
if Data.data_type <> data_null then Data := Data.ldata^;
{$else}Data.data_type := data_null;{$endif}
end
else Result := Def^;
end;
[size=-2]------ Добавлено в 12:31
Dilma, не могу аттач удалить из поста