From 955990569ad113e06724c51f17d6ec78324a0ea8 Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Tue, 30 Mar 2010 18:20:21 +0200 Subject: [PATCH] ag: erste testfaelle --- ag/lewurm_00.3 | 6 ++++++ ag/lewurm_01.3 | 8 ++++++++ ag/lewurm_02.3 | 4 ++++ ag/lewurm_03.0 | 5 +++++ 4 files changed, 23 insertions(+) create mode 100644 ag/lewurm_00.3 create mode 100644 ag/lewurm_01.3 create mode 100644 ag/lewurm_02.3 create mode 100644 ag/lewurm_03.0 diff --git a/ag/lewurm_00.3 b/ag/lewurm_00.3 new file mode 100644 index 0000000..25e8e2f --- /dev/null +++ b/ag/lewurm_00.3 @@ -0,0 +1,6 @@ +method f(a b c) + /* x nicht deklariert */ + if a < x then + c := 0x1; + end; +end; diff --git a/ag/lewurm_01.3 b/ag/lewurm_01.3 new file mode 100644 index 0000000..eda05e0 --- /dev/null +++ b/ag/lewurm_01.3 @@ -0,0 +1,8 @@ +method f(a b c) + if a < b then + var x := 0; + c := 1; + end; + /* x ist nicht im scope */ + x := x - 1; +end; diff --git a/ag/lewurm_02.3 b/ag/lewurm_02.3 new file mode 100644 index 0000000..c5fc09a --- /dev/null +++ b/ag/lewurm_02.3 @@ -0,0 +1,4 @@ +method f(a b c) + /* x ist (noch) nicht im scope */ + var x := x - 1; +end; diff --git a/ag/lewurm_03.0 b/ag/lewurm_03.0 new file mode 100644 index 0000000..1ac988c --- /dev/null +++ b/ag/lewurm_03.0 @@ -0,0 +1,5 @@ +struct a end; +method f(b c s) + /* lesender feldzugriff */ + var b := c*(s.a - 1); +end; -- 2.25.1