blob: ae84467df904994220005d4f573791de4c16a6b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{ Old file: tbs0272.pp }
{ No error issued if wrong parameter in function inside a second function OK 0.99.13 (PFV) }
program test_const_string;
function astring(s :string) : string;
begin
astring:='Test string'+s;
end;
procedure testvar(var s : string);
begin
writeln('testvar s is "',s,'"');
end;
procedure testconst(const s : string);
begin
writeln('testconst s is "',s,'"');
end;
procedure testvalue(s : string);
begin
writeln('testvalue s is "',s,'"');
end;
const
s : string = 'test';
conststr = 'Const test';
begin
testvalue(astring('e'));
testconst(astring(s));
testconst(conststr);
end.
|