mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-20 07:49:33 +01:00
*** empty log message ***
This commit is contained in:
parent
78935f0a9b
commit
c8a9e40f5b
@ -2,7 +2,7 @@ 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;
|
||||
@ -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);
|
||||
end;
|
||||
end;
|
||||
writeln('Error');
|
||||
halt(1);
|
||||
end.
|
||||
@ -8,20 +8,15 @@ var
|
||||
l: TList;
|
||||
IsCaught: boolean;
|
||||
|
||||
|
||||
|
||||
begin
|
||||
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;
|
||||
end;
|
||||
If not IsCaught then
|
||||
begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user