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