diff options
author | Adam NAILI | 2018-06-03 15:30:53 +0200 |
---|---|---|
committer | Adam NAILI | 2018-06-03 15:30:53 +0200 |
commit | b8f7e7b6843c2bff778ce3c74e355a03e7565499 (patch) | |
tree | 9a99518d868af17e5c82ee892f0fde65cf361da5 /res | |
parent | 628b18fb15ee3d6633c73d404f109d01f0a7ece2 (diff) | |
download | tpc-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.tpc | 15 |
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 @@ | |||
4 | entier r1,b,s,c,r2 ; | 4 | entier r1,b,s,c,r2 ; |
5 | caractere letter, digit, punct; | 5 | caractere letter, digit, punct; |
6 | 6 | ||
7 | void 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 | |||
7 | entier main(void) { | 17 | entier main(void) { |
8 | r1=12; | 18 | calcul(); |
9 | r2=13; | ||
10 | b = r1 + r2; | ||
11 | print(b); | ||
12 | } | 19 | } |