9
parrayobj = ^tarraycla;
11
ar : array [1..4] of real;
12
constructor create(do_fail : boolean);
13
procedure test;virtual;
14
destructor done;virtual;
16
pbigarrayobj = ^tbigarraycla;
17
tbigarraycla = class(tarraycla)
18
ar2 : array [1..10000] of real;
19
constructor good_init;
20
constructor wrong_init;
21
procedure test;virtual;
26
constructor tarraycla.create(do_fail : boolean);
34
destructor tarraycla.done;
38
procedure tarraycla.test;
41
Writeln('Init called');
43
Writeln('Init successful');
46
constructor tbigarraycla.good_init;
48
inherited create(false);
49
Writeln('End of tbigarraycla.good_init');
52
constructor tbigarraycla.wrong_init;
54
inherited create(true);
55
Writeln('End of tbigarraycla.wrong_init');
58
procedure tbigarraycla.test;
60
Writeln('tbigarraycla.test called');
65
ta1:=tarraycla.create(false);
66
writeln('Call to ta1.test after successful init');
68
ta2:=tarraycla.create(true);
69
writeln('ta2 = ',ptrint(ta2),' after unsuccessful init');
70
Writeln('Trying to call ta2.test (should generate a Run Time Error)');