From 0caa6768c7055c3e3fb2f2ebeda2c35152ea011b Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Sun, 4 Aug 2019 21:23:38 -0400 Subject: Update checks --- check/array.p | 32 ++++++++++++++++++++++++++++++++ check/for.p | 16 ++++++++++++++++ check/main.p | 5 +---- 3 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 check/array.p create mode 100644 check/for.p (limited to 'check') 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..694f9a5 --- /dev/null +++ b/check/for.p @@ -0,0 +1,16 @@ +program main ( input, output ); + + var a, b: integer; + var x,y,z: real; + var ai :array [1..10] of integer; +begin +{ TEST } + + a := 1; + x := 3.14; + b := a + 35; + (* 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. -- cgit v1.1