aboutsummaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorAdam NAILI2018-06-05 19:53:58 +0200
committerAdam NAILI2018-06-05 19:53:58 +0200
commita67cd40065f790383776ec3fffa364f6443f7ee7 (patch)
tree420f183d70f4278cebe2e670964c064598337bea /res
parent7138ea2f185c6963cfd09a13cfc289d4d1452858 (diff)
downloadtpc-compiler-a67cd40065f790383776ec3fffa364f6443f7ee7.tar.gz
Parameters handling (without checking types on parameters)
Diffstat (limited to 'res')
-rw-r--r--res/test_parameters.tpc17
1 files changed, 17 insertions, 0 deletions
diff --git a/res/test_parameters.tpc b/res/test_parameters.tpc
new file mode 100644
index 0000000..d7b2061
--- /dev/null
+++ b/res/test_parameters.tpc
@@ -0,0 +1,17 @@
1/* test-table-symboles.tpc */
2
3/* Test file for simplified translator of a declaration of variables in C */
4
5entier test(entier a,entier b,entier c){
6 entier x;
7 entier y;
8 y = 1;
9 x = 21;
10 print(x+y);
11 return a*b+c;
12}
13
14entier main(void) {
15 print(test(6,2,3));
16 return 0;
17}