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