aboutsummaryrefslogtreecommitdiff
path: root/Testing/Semantic/t3-3.p
diff options
context:
space:
mode:
Diffstat (limited to 'Testing/Semantic/t3-3.p')
-rw-r--r--Testing/Semantic/t3-3.p13
1 files changed, 13 insertions, 0 deletions
diff --git a/Testing/Semantic/t3-3.p b/Testing/Semantic/t3-3.p
new file mode 100644
index 0000000..32b5e59
--- /dev/null
+++ b/Testing/Semantic/t3-3.p
@@ -0,0 +1,13 @@
+(* dangling ELSE binds to closest IF *)
+program main( input, output );
+ var a: integer;
+begin
+ read(a);
+ if ( a < 10 ) then
+ if ( a >= 10 ) then
+ a := 1
+ else
+ a := 0;
+ write(a)
+end.
+