diff options
author | Adam NAILI | 2018-06-05 19:53:58 +0200 |
---|---|---|
committer | Adam NAILI | 2018-06-05 19:53:58 +0200 |
commit | a67cd40065f790383776ec3fffa364f6443f7ee7 (patch) | |
tree | 420f183d70f4278cebe2e670964c064598337bea /res | |
parent | 7138ea2f185c6963cfd09a13cfc289d4d1452858 (diff) | |
download | tpc-compiler-a67cd40065f790383776ec3fffa364f6443f7ee7.tar.gz |
Parameters handling (without checking types on parameters)
Diffstat (limited to 'res')
-rw-r--r-- | res/test_parameters.tpc | 17 |
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 | |||
5 | entier 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 | |||
14 | entier main(void) { | ||
15 | print(test(6,2,3)); | ||
16 | return 0; | ||
17 | } | ||