diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-08-18 22:33:52 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-08-18 22:33:52 -0400 |
commit | bb9070ca0d79d2314c25b83e4496f43488446734 (patch) | |
tree | 3246d6c237eac1ca2802c241feb77545d12a40e2 /check | |
parent | ceb4fb57521582835643d9bfc3dfda89eca6f1f0 (diff) | |
parent | dd07055aca1c45d147d773350e0c21930822a74f (diff) |
Merge branch 'master' into mem-management
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. |