comparison test_para.c @ 27:586096c45873

clean up
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 23 May 2020 07:19:57 +0900
parents 35d6eabeadb0
children
comparison
equal deleted inserted replaced
26:1db97badc4e0 27:586096c45873
1 #include<stdio.h> 1 #include<stdio.h>
2 #include<stdlib.h> 2 #include<stdlib.h>
3 3
4 __code cs_exit(int a){ 4 __code cs_exit(int a){
5 printf("cs_exit was called: a=%d.\n", a); 5 printf("cs_exit was called: a=%d.\n", a);
6 exit(a); 6 exit(a);
7 } 7 }
8 8
9 __code cs0(int a, double b, int c, int d){ 9 __code cs0(int a, double b, int c, int d){
10 printf("cs0 was called: a=%d, b=%lf, c=%d, d=%d.\n", a, b, c, d); 10 printf("cs0 was called: a=%d, b=%lf, c=%d, d=%d.\n", a, b, c, d);
11 goto cs_exit( (int)(20*a + 4.4*b + 2022/c + 28*d) ); 11 goto cs_exit( (int)(20*a + 4.4*b + 2022/c + 28*d) );
12 } 12 }
13 13
14
14 __code cs_goto(){ 15 __code cs_goto(){
15 goto cs0(11, 22.2, 33, 44); 16 goto cs0(11, 22.2, 33, 44);
16 } 17 }
17 18
18 int main(int argc, char **argv){ 19 int main(int argc, char **argv){
19 printf("it is in main.\n"); 20
20 goto cs_goto(); 21 printf("it is in main.\n");
21 return 0; 22 goto cs_goto();
23 return 0;
22 } 24 }
23 25
24 26