annotate testproject/main.mod @ 25:d3c4bf3720a3

Beginning of multitasking
author windel
date Tue, 27 Dec 2011 13:31:38 +0100
parents edd70006d3e4
children
rev   line source
8
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
1 module main;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
2 var
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
3 a,b,c : integer;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
4
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
5 procedure test(x:integer);
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
6 var y,z:integer;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
7 begin
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
8 y := x * 3 + 2;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
9 z := x + y + a;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
10 end test;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
11
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
12 procedure add(a:integer; b:integer):integer;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
13 var
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
14 tmp : integer;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
15 begin
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
16 tmp := a + b;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
17 return tmp
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
18 end add;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
19
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
20 begin
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
21 a := 12;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
22 b := a * 12 + 33;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
23 c := a div b + a * b * 99;
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
24 end main.
edd70006d3e4 Started with MDI functions
windel
parents:
diff changeset
25