|
@@ -3829,16 +3829,25 @@ begin
|
|
'type',
|
|
'type',
|
|
' TObject = class',
|
|
' TObject = class',
|
|
' Index: longint;',
|
|
' Index: longint;',
|
|
|
|
+ ' procedure DoAbs(Item: pointer);',
|
|
' end;',
|
|
' end;',
|
|
- 'procedure DoIt(i: longint);',
|
|
|
|
|
|
+ 'procedure TObject.DoAbs(Item: pointer);',
|
|
|
|
+ 'var',
|
|
|
|
+ ' o: TObject absolute Item;',
|
|
|
|
+ 'begin',
|
|
|
|
+ ' if o.Index<o.Index then o.Index:=o.Index;',
|
|
|
|
+ 'end;',
|
|
|
|
+ 'procedure DoIt(i: longint; p: pointer);',
|
|
'var',
|
|
'var',
|
|
' d: double absolute i;',
|
|
' d: double absolute i;',
|
|
' s: string absolute d;',
|
|
' s: string absolute d;',
|
|
- ' o: TObject absolute i;',
|
|
|
|
|
|
+ ' oi: TObject absolute i;',
|
|
|
|
+ ' op: TObject absolute p;',
|
|
'begin',
|
|
'begin',
|
|
' if d=d then d:=d;',
|
|
' if d=d then d:=d;',
|
|
' if s=s then s:=s;',
|
|
' if s=s then s:=s;',
|
|
- ' if o.Index<o.Index then o.Index:=o.Index;',
|
|
|
|
|
|
+ ' if oi.Index<oi.Index then oi.Index:=oi.Index;',
|
|
|
|
+ ' if op.Index=op.Index then op.Index:=op.Index;',
|
|
'end;',
|
|
'end;',
|
|
'begin']);
|
|
'begin']);
|
|
ConvertProgram;
|
|
ConvertProgram;
|
|
@@ -3850,11 +3859,15 @@ begin
|
|
' };',
|
|
' };',
|
|
' this.$final = function () {',
|
|
' this.$final = function () {',
|
|
' };',
|
|
' };',
|
|
|
|
+ ' this.DoAbs = function (Item) {',
|
|
|
|
+ ' if (Item.Index < Item.Index) Item.Index = Item.Index;',
|
|
|
|
+ ' };',
|
|
'});',
|
|
'});',
|
|
- 'this.DoIt = function (i) {',
|
|
|
|
|
|
+ 'this.DoIt = function (i, p) {',
|
|
' if (i === i) i = i;',
|
|
' if (i === i) i = i;',
|
|
' if (i === i) i = i;',
|
|
' if (i === i) i = i;',
|
|
' if (i.Index < i.Index) i.Index = i.Index;',
|
|
' if (i.Index < i.Index) i.Index = i.Index;',
|
|
|
|
+ ' if (p.Index === p.Index) p.Index = p.Index;',
|
|
'};'
|
|
'};'
|
|
]),
|
|
]),
|
|
LinesToStr([
|
|
LinesToStr([
|