mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 17:08:01 +02:00

--- Reverse-merging r19116 into '.': U tests\webtbs\tw4675.pp U tests\webtbs\tw7758.pp U tests\webtbs\tw18702.pp U tests\webtbs\tw3595.pp U tests\webtbs\tw5001.pp U tests\webtbs\tw2250.pp U tests\webtbs\tw3492.pp U tests\webtbs\tw16004.pp G . --- Recording mergeinfo for reverse merge of r19116 into '.': G . git-svn-id: trunk@19135 -
39 lines
562 B
ObjectPascal
39 lines
562 B
ObjectPascal
program project1;
|
|
|
|
{$mode objfpc}{$H+}
|
|
{$modeswitch nestedprocvars}
|
|
|
|
type
|
|
TGetSQLTextProc = function() : string is nested;
|
|
|
|
procedure TestSQLFieldType(AGetSQLTextProc: TGetSQLTextProc);
|
|
var
|
|
i : byte;
|
|
s: string;
|
|
begin
|
|
for i := 0 to 9 do
|
|
begin
|
|
s := AGetSQLTextProc();
|
|
if s<>'hello' then
|
|
begin
|
|
writeln('Failed');
|
|
halt(i+1);
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
procedure TestSQLClob;
|
|
|
|
function GetSQLText() : string;
|
|
begin
|
|
result := 'hello';
|
|
end;
|
|
|
|
begin
|
|
TestSQLFieldType(@GetSQLText);
|
|
end;
|
|
|
|
begin
|
|
TestSQLClob;
|
|
end.
|