aboutsummaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorAdam NAILI2018-06-04 23:26:01 +0200
committerAdam NAILI2018-06-04 23:26:01 +0200
commitfb9befa3d883250d67b6cec492018c78f89ef2e8 (patch)
treede82edd1e6129389e5fe70331685eb617fb982f7 /res
parentb8f7e7b6843c2bff778ce3c74e355a03e7565499 (diff)
downloadtpc-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.tpc15
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 */
4entier r1,b,s,c,r2 ;
5caractere letter, digit, punct;
6
7void calcul(void) {
8 caractere r1;
9 readc(r1);
10 print(r1);
11}
12
13entier main(void) {
14 calcul();
15}