From fb9befa3d883250d67b6cec492018c78f89ef2e8 Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Mon, 4 Jun 2018 23:26:01 +0200 Subject: 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 --- res/test_read.tpc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 res/test_read.tpc (limited to 'res') 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 @@ +/* test-table-symboles.tpc */ + +/* Test file for simplified translator of a declaration of variables in C */ +entier r1,b,s,c,r2 ; +caractere letter, digit, punct; + +void calcul(void) { + caractere r1; + readc(r1); + print(r1); +} + +entier main(void) { + calcul(); +} -- cgit v1.2.3