aboutsummaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorAdam NAILI2018-06-03 15:30:53 +0200
committerAdam NAILI2018-06-03 15:30:53 +0200
commitb8f7e7b6843c2bff778ce3c74e355a03e7565499 (patch)
tree9a99518d868af17e5c82ee892f0fde65cf361da5 /res
parent628b18fb15ee3d6633c73d404f109d01f0a7ece2 (diff)
downloadtpc-compiler-b8f7e7b6843c2bff778ce3c74e355a03e7565499.tar.gz
Functions tables + void functions working (need to work on returns and parameters cause all functions are void here)
Diffstat (limited to 'res')
-rw-r--r--res/test_global.tpc15
1 files changed, 11 insertions, 4 deletions
diff --git a/res/test_global.tpc b/res/test_global.tpc
index 789f290..731fffb 100644
--- a/res/test_global.tpc
+++ b/res/test_global.tpc
@@ -4,9 +4,16 @@
4entier r1,b,s,c,r2 ; 4entier r1,b,s,c,r2 ;
5caractere letter, digit, punct; 5caractere letter, digit, punct;
6 6
7void calcul(void) {
8 entier i;
9 i = 3;
10 r1=12;
11 r2=13;
12 b = r1 + r2 + i;
13 print(b);
14}
15
16
7entier main(void) { 17entier main(void) {
8 r1=12; 18 calcul();
9 r2=13;
10 b = r1 + r2;
11 print(b);
12} 19}