mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:29:17 +02:00
* extended test
git-svn-id: trunk@5005 -
This commit is contained in:
parent
943582b5f0
commit
9f5a2063a1
@ -1,14 +1,22 @@
|
|||||||
{$mode macpas}
|
{$mode macpas}
|
||||||
|
|
||||||
procedure test(s: string);
|
procedure test(const s: string);
|
||||||
begin
|
begin
|
||||||
if s <> 'abcd' then
|
if s <> 'abcd' then
|
||||||
halt(1);
|
halt(1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure test2(c1,c2,c3,c4: char);
|
||||||
|
begin
|
||||||
|
if (c1 <> 'a') or (c2 <> 'b') or (c3 <> 'c') or (c4 <> 'd') then
|
||||||
|
halt(2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
l: longint;
|
l: longint;
|
||||||
begin
|
begin
|
||||||
l := 'abcd';
|
l := 'abcd';
|
||||||
test(l);
|
test(l);
|
||||||
|
test2(char(l shr 24),char(l shr 16),char(l shr 8),char(l));
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user