aboutsummaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rw-r--r--check/array.p6
-rw-r--r--check/main.p15
2 files changed, 18 insertions, 3 deletions
diff --git a/check/array.p b/check/array.p
index e378655..e312ef5 100644
--- a/check/array.p
+++ b/check/array.p
@@ -3,12 +3,13 @@ program main ( input, output );
var a, b: integer;
var x,y,z: real;
var ai :array [1..10] of integer;
+ var ar, ar2, ar3, ar4 :array [10..100] of real;
procedure boo (n: integer);
var a,c: integer;
begin
a := n
end;
- function bar (a: integer) : real;
+ function bar (a: integer; b: array [19..100] of real) : real;
var test:integer;
begin
test := 2;
@@ -27,6 +28,7 @@ begin
a := 1;
x := 3.14;
b := a + 35;
- ai[2] := a
+ ai[2] := a;
+ bar (a, ar)
(* test *)
end.
diff --git a/check/main.p b/check/main.p
index 613f8dc..e9c7441 100644
--- a/check/main.p
+++ b/check/main.p
@@ -1,6 +1,6 @@
program main ( input, output );
- var a, b: integer;
+ var a, b, c, d, e, f: integer;
var x,y,z: real;
var ai :array [1..10] of integer;
procedure boo (n: integer);
@@ -21,11 +21,24 @@ program main ( input, output );
z := 1e-10;
y := 2.5543e-2
end;
+ function order (a, b, c: integer) : real;
+ begin
+ a := 2
+ end;
+ function order2 (a, b, c, d, e: integer) : real;
+ begin
+ a := 2
+ end;
begin
{ TEST }
a := 1;
x := 3.14;
+ x := order(a, b, c);
+ x := order2(a, b, c, d, e);
+ x := bar(a);
+ foo;
+ boo(a);
b := a + 35
(* test *)
end.