@@ -2,10 +2,10 @@ type
tsplitextended = record
case byte of
0: (a: array[0..9] of byte);
- { the following "a" should give a duplicate identifier errorÊ}
+ { the following "a" should give a duplicate identifier error }
1: (a: array[0..4] of word);
2: (a: array[0..1] of cardinal; w: word);
end;
begin
-end.
+end.
@@ -8,8 +8,10 @@ begin
f := TFileStream.Create('a nonexistent file', fmOpenRead);
except
on e: Exception do begin
- WriteLn(e.Message);
f.Free;
+ halt(0);
+ writeln('Error');
+ halt(1);
@@ -8,24 +8,19 @@ var
l: TList;
IsCaught: boolean;
-
L:= TList.Create;
IsCaught:=false;
Try
- WriteLn(LongInt(L[0]));{L[0] not exist, ==> access violation}
- L.Free;
+ WriteLn(LongInt(L[0]));{L[0] not exist, ==> access violation}
+ L.Free;
Except
on eListError do
- begin
- Writeln('Exception caught');
- IsCaught:=true;
- end;
+ IsCaught:=true;
If not IsCaught then
Writeln('Error in TList');
Halt(1);