3 typedef struct{double x
,y
;}point
;
4 point pts
[]={{1.0,2.0},{3.0,4.0},{5.0,6.0},{7.0,8.0}};
5 static int va1(int nargs
,...)
12 pi
=va_arg(args
,point
);
13 if(pts
[i
].x
!=pi
.x
||pts
[i
].y
!=pi
.y
)abort();
18 typedef struct{int x
,y
;}ipoint
;
19 ipoint ipts
[]={{1,2},{3,4},{5,6},{7,8}};
20 static int va2(int nargs
,...)
27 pi
=va_arg(args
,ipoint
);
28 if(ipts
[i
].x
!=pi
.x
||ipts
[i
].y
!=pi
.y
)abort();
35 va1(4,pts
[0],pts
[1],pts
[2],pts
[3]);
36 va2(4,ipts
[0],ipts
[1],ipts
[2],ipts
[3]);