mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 12:20:35 +08:00
Resync new repository with old repo r5166
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5153 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{ a simple nested function }
|
||||
|
||||
program simplefunc(output);
|
||||
|
||||
function addmul(term1a, term1b, term2a, term2b: integer ) : integer;
|
||||
function factor(terma, termb: integer ) : integer;
|
||||
begin
|
||||
factor := terma + termb;
|
||||
end;
|
||||
begin
|
||||
addmul := factor(term1a, term1b) * factor(term2a, term2b);
|
||||
end;
|
||||
|
||||
begin
|
||||
writeln('(1 + 2) * (3 + 4) =', addmul(1, 2, 3, 4));
|
||||
end.
|
||||
Reference in New Issue
Block a user