Mercurial > hg > CbC > CbC_gcc
diff CbC-examples/test_para.c @ 16:4c6926a2b9bc
examples.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 24 Sep 2009 12:51:25 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_para.c Thu Sep 24 12:51:25 2009 +0900 @@ -0,0 +1,26 @@ +#include<stdio.h> +#include<stdlib.h> + +__code cs_exit(int 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) ); +} + + +__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; +} + +