diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2020-06-20 19:30:13 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2020-06-20 19:30:13 +0200 |
commit | c35a3209434122adfce3159210cdaef380c1e952 (patch) | |
tree | f46029e8c2eb7e5f6684c76e8ed4390869a87f70 /ecomp-c/test1.e | |
parent | e65aa4b6f359327c142d099328c23197857593ac (diff) | |
download | compilertests-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.e | 11 |
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 |