|
@@ -18244,6 +18244,7 @@ begin
|
|
' r: TRec;',
|
|
' r: TRec;',
|
|
' p: PRec;',
|
|
' p: PRec;',
|
|
' q: ^TRec;',
|
|
' q: ^TRec;',
|
|
|
|
+ ' Ptr: pointer;',
|
|
'begin',
|
|
'begin',
|
|
' new(p);',
|
|
' new(p);',
|
|
' p:=@r;',
|
|
' p:=@r;',
|
|
@@ -18255,6 +18256,8 @@ begin
|
|
' dispose(p);',
|
|
' dispose(p);',
|
|
' new(q);',
|
|
' new(q);',
|
|
' dispose(q);',
|
|
' dispose(q);',
|
|
|
|
+ ' Ptr:=p;',
|
|
|
|
+ ' p:=PRec(ptr);',
|
|
'']);
|
|
'']);
|
|
ConvertProgram;
|
|
ConvertProgram;
|
|
CheckSource('TestPointer_Record',
|
|
CheckSource('TestPointer_Record',
|
|
@@ -18272,6 +18275,7 @@ begin
|
|
'this.r = new $mod.TRec();',
|
|
'this.r = new $mod.TRec();',
|
|
'this.p = null;',
|
|
'this.p = null;',
|
|
'this.q = null;',
|
|
'this.q = null;',
|
|
|
|
+ 'this.Ptr = null;',
|
|
'']),
|
|
'']),
|
|
LinesToStr([ // $mod.$main
|
|
LinesToStr([ // $mod.$main
|
|
'$mod.p = new $mod.TRec();',
|
|
'$mod.p = new $mod.TRec();',
|
|
@@ -18284,6 +18288,8 @@ begin
|
|
'$mod.p = null;',
|
|
'$mod.p = null;',
|
|
'$mod.q = new $mod.TRec();',
|
|
'$mod.q = new $mod.TRec();',
|
|
'$mod.q = null;',
|
|
'$mod.q = null;',
|
|
|
|
+ '$mod.Ptr = $mod.p;',
|
|
|
|
+ '$mod.p = $mod.Ptr;',
|
|
'']));
|
|
'']));
|
|
end;
|
|
end;
|
|
|
|
|