You are on page 1of 1

C Compiler Reference Manual

Reference Parameters
The compiler has limited support for reference parameters. This increases the
readability of code and the efficiency of some inline procedures. The following
two procedures are the same. The one with reference parameters will be
implemented with greater efficiency when it is inline.
funct_a(int*x,int*y){
/*Traditional*/
if(*x!=5)
*y=*x+3;
}
funct_a(&a,&b);

funct_b(int&x,int&y){
/*Reference params*/
if(x!=5)
y=x+3;
}
funct_b(a,b);

78

You might also like