16
|
1 //#include<stdio.h>
|
|
2 double test(char, char, int, double);
|
|
3 __code cs(int , double , char );
|
|
4 void testvoid(double a);
|
|
5 int testint(double a);
|
|
6
|
|
7 __code cs(int a, double b, char c){
|
|
8 printf("__code cs was called.\n");
|
|
9 printf("a = %d, b = %lf, c = %d\n", a, b, c);
|
|
10 exit(0);
|
|
11 }
|
|
12 __code cs1(int a, double b, char c, int d){
|
|
13 printf("__code cs1 was called.\n");
|
|
14 printf("a = %d, b = %lf, c = %d, d = %d\n", a, b, c, d);
|
|
15 exit(0);
|
|
16 }
|
|
17
|
|
18 int main(int argc, char **argv){
|
|
19 double t;
|
|
20 //goto cs(2, 10.2, 2);
|
|
21
|
|
22 t = test('a', 'b', 10, 2.5);
|
|
23 printf("t = %lf\n", t);
|
|
24 testvoid(2.22);
|
|
25 testint(2.22);
|
|
26
|
|
27 printf("test_goto\n");
|
|
28 goto test_goto1(10, 20, 30.3);
|
|
29 return 0;
|
|
30 }
|
|
31 void test0(){
|
|
32 exit(0);
|
|
33 }
|
|
34
|
|
35 void testvoid(double a){
|
|
36 return ;
|
|
37 }
|
|
38 int testint(double a){
|
|
39 int b;
|
|
40 b = (a*100-a) +2;
|
|
41 return 1;
|
|
42 }
|
|
43
|
|
44 double test(char c, char l, int a, double d){
|
|
45 return (double)a*d+c+l;
|
|
46 }
|
|
47
|
|
48 void test_goto(int a, int b, double c){
|
|
49 goto cs(2, 10.2, 3);
|
|
50 }
|
|
51 __code test_goto1(int a, int b, double c){
|
|
52 goto cs1(2, 10.2, 3, 4);
|
|
53 }
|
|
54
|