langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
|
|
@ -0,0 +1,15 @@
|
|||
program example(output);
|
||||
|
||||
function first(function f(x: real): real): real;
|
||||
begin
|
||||
first := f(1.0) + 2.0;
|
||||
end;
|
||||
|
||||
function second(x: real): real;
|
||||
begin
|
||||
second := x/2.0;
|
||||
end;
|
||||
|
||||
begin
|
||||
writeln(first(second));
|
||||
end.
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
program example;
|
||||
|
||||
type
|
||||
FnType = function(x: real): real;
|
||||
|
||||
function first(f: FnType): real;
|
||||
begin
|
||||
first := f(1.0) + 2.0;
|
||||
end;
|
||||
|
||||
{$F+}
|
||||
function second(x: real): real;
|
||||
begin
|
||||
second := x/2.0;
|
||||
end;
|
||||
{$F-}
|
||||
|
||||
begin
|
||||
writeln(first(second));
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue