pascalabcnet/_Presentations/2015 New Features/Programs/25_lambda0.pas

10 lines
130 B
ObjectPascal
Raw Permalink Normal View History

2015-05-14 22:35:07 +03:00
function MyFun(x: real): real := 3*x-2;
var f: RealFunc;
begin
f := MyFun;
writeln(f(2));
f := sqrt;
writeln(f(2));
end.