summaryrefslogtreecommitdiff
path: root/ecomp-c/test1.e
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-06-20 19:30:13 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2020-06-20 19:30:13 +0200
commitc35a3209434122adfce3159210cdaef380c1e952 (patch)
treef46029e8c2eb7e5f6684c76e8ed4390869a87f70 /ecomp-c/test1.e
parente65aa4b6f359327c142d099328c23197857593ac (diff)
downloadcompilertests-c35a3209434122adfce3159210cdaef380c1e952.tar.gz
compilertests-c35a3209434122adfce3159210cdaef380c1e952.tar.bz2
first version of array dereferncing (read and write) using the stack
Diffstat (limited to 'ecomp-c/test1.e')
-rw-r--r--ecomp-c/test1.e11
1 files changed, 6 insertions, 5 deletions
diff --git a/ecomp-c/test1.e b/ecomp-c/test1.e
index d88c3de..e9e2cec 100644
--- a/ecomp-c/test1.e
+++ b/ecomp-c/test1.e
@@ -61,14 +61,15 @@ begin
end;
j := 'B';
- a1[4] := 42;
- s1[0] := 'a';
- s[0] := 'H';
+ s1[0] := ' ';
+ s[0] := 'X';
+ s[1] := s[0];
+ j := s[2];
i := 0;
while i < 10 do
a1[i] := i;
i := i + 1;
end;
- s2[a1[2]] := 'X';
- //j := s2[1];
+ a1[4] := 42;
+ s2[a1[2]] := 'Z';
end