diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-16 13:40:36 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-16 13:40:36 -0400 |
commit | 174208192d8ebd0f43e18cba978257ec74ead14a (patch) | |
tree | fac14a955ecca1540f85cb496d5e43973b897f2d | |
parent | 9138dd3df13215a03b295c9ed6cccd9cd49b2d3e (diff) |
Updates pascal check files
-rw-r--r-- | check/array.p | 6 | ||||
-rw-r--r-- | check/main.p | 15 |
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. |