diff options
author | Adam NAILI | 2018-06-04 23:26:01 +0200 |
---|---|---|
committer | Adam NAILI | 2018-06-04 23:26:01 +0200 |
commit | fb9befa3d883250d67b6cec492018c78f89ef2e8 (patch) | |
tree | de82edd1e6129389e5fe70331685eb617fb982f7 /res | |
parent | b8f7e7b6843c2bff778ce3c74e355a03e7565499 (diff) | |
download | tpc-compiler-fb9befa3d883250d67b6cec492018c78f89ef2e8.tar.gz |
Modifying print function to handle char and int automatically, implementing reade and readc, handling two variables with the same name in different scope => local variable has priority on the global one
Diffstat (limited to 'res')
-rw-r--r-- | res/test_read.tpc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/res/test_read.tpc b/res/test_read.tpc new file mode 100644 index 0000000..a201223 --- /dev/null +++ b/res/test_read.tpc | |||
@@ -0,0 +1,15 @@ | |||
1 | /* test-table-symboles.tpc */ | ||
2 | |||
3 | /* Test file for simplified translator of a declaration of variables in C */ | ||
4 | entier r1,b,s,c,r2 ; | ||
5 | caractere letter, digit, punct; | ||
6 | |||
7 | void calcul(void) { | ||
8 | caractere r1; | ||
9 | readc(r1); | ||
10 | print(r1); | ||
11 | } | ||
12 | |||
13 | entier main(void) { | ||
14 | calcul(); | ||
15 | } | ||