aboutsummaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-08-03 20:48:13 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-08-03 20:48:39 -0400
commit8c59ccd6e23ac63d59f5839ad410c04b393ff0c0 (patch)
tree7f73ed2cf6450614599514ca77a2646624484da8 /check
parente9ae811ffaa08caef0acca643ca1e7a1ff72396f (diff)
parent12f50dec6a529784a360dfaec9dc562b810ae2fd (diff)
Merge branch 'scopes' into types
Diffstat (limited to 'check')
-rw-r--r--check/main.p34
-rw-r--r--check/nesting.p69
2 files changed, 103 insertions, 0 deletions
diff --git a/check/main.p b/check/main.p
new file mode 100644
index 0000000..f05808b
--- /dev/null
+++ b/check/main.p
@@ -0,0 +1,34 @@
+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;
+ (* test *)
+ for c := 0 to 10 do begin
+ for a:= 10 downto 0 do b := a - c
+ end
+end.
diff --git a/check/nesting.p b/check/nesting.p
new file mode 100644
index 0000000..6d24b6b
--- /dev/null
+++ b/check/nesting.p
@@ -0,0 +1,69 @@
+
+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;
+ procedure foo2;
+ procedure foo13;
+ procedure foo4;
+ procedure foo5;
+ procedure foo6;
+ procedure foo7;
+ procedure foo46;
+ procedure fooaoesut;
+ procedure foosathst;
+ procedure foothsth;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+ begin
+ a := 33333
+ end;
+begin
+{ TEST }
+
+ a := 1;
+ x := 3.14;
+ b := a + 35
+ (* test *)
+end.