Mercurial > hg > CbC > CbC_examples
diff test_para.c @ 2:35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 22 Oct 2014 02:06:29 +0900 |
parents | bacef8675607 |
children | 586096c45873 |
line wrap: on
line diff
--- a/test_para.c Wed Oct 22 00:38:01 2014 +0900 +++ b/test_para.c Wed Oct 22 02:06:29 2014 +0900 @@ -2,25 +2,23 @@ #include<stdlib.h> __code cs_exit(int a){ - printf("cs_exit was called: a=%d.\n", a); - exit(a); + printf("cs_exit was called: a=%d.\n", a); + exit(a); } __code cs0(int a, double b, int c, int d){ - printf("cs0 was called: a=%d, b=%lf, c=%d, d=%d.\n", a, b, c, d); - goto cs_exit( (int)(20*a + 4.4*b + 2022/c + 28*d) ); + printf("cs0 was called: a=%d, b=%lf, c=%d, d=%d.\n", a, b, c, d); + goto cs_exit( (int)(20*a + 4.4*b + 2022/c + 28*d) ); +} + +__code cs_goto(){ + goto cs0(11, 22.2, 33, 44); +} + +int main(int argc, char **argv){ + printf("it is in main.\n"); + goto cs_goto(); + return 0; } -__code cs_goto(){ - goto cs0(11, 22.2, 33, 44); -} - -int main(int argc, char **argv){ - - printf("it is in main.\n"); - goto cs_goto(); - return 0; -} - -