diff options
Diffstat (limited to 'check')
-rw-r--r-- | check/array.p | 32 | ||||
-rw-r--r-- | check/for.p | 11 | ||||
-rw-r--r-- | check/main.p | 5 |
3 files changed, 44 insertions, 4 deletions
diff --git a/check/array.p b/check/array.p new file mode 100644 index 0000000..e378655 --- /dev/null +++ b/check/array.p @@ -0,0 +1,32 @@ +program main ( input, output ); + + var a, b: integer; + var x,y,z: real; + var ai :array [1..10] of integer; + procedure boo (n: integer); + var a,c: integer; + begin + a := n + end; + function bar (a: integer) : real; + var test:integer; + begin + test := 2; + a := 2 + end; + procedure foo; + begin + a := 33333; + x := 1e10; + z := 1e-10; + y := 2.5543e-2 + end; +begin +{ TEST } + + a := 1; + x := 3.14; + b := a + 35; + ai[2] := a + (* test *) +end. diff --git a/check/for.p b/check/for.p new file mode 100644 index 0000000..5391c8c --- /dev/null +++ b/check/for.p @@ -0,0 +1,11 @@ +program main ( input, output ); + + var a, b,c: integer; +begin + + a := 1; + (* test *) + for c := 0 to 10 do begin + for a:= 10 downto 0 do b := a - c + end +end. diff --git a/check/main.p b/check/main.p index f05808b..613f8dc 100644 --- a/check/main.p +++ b/check/main.p @@ -26,9 +26,6 @@ begin a := 1; x := 3.14; - b := a + 35; + b := a + 35 (* test *) - for c := 0 to 10 do begin - for a:= 10 downto 0 do b := a - c - end end. |