PCDIDE COMPILER Custom Computer Services Inc (CCS), PCDIDE COMPILER Datasheet - Page 54

PCD C-COMPILER PIC24, DSPIC

PCDIDE COMPILER

Manufacturer Part Number
PCDIDE COMPILER
Description
PCD C-COMPILER PIC24, DSPIC
Manufacturer
Custom Computer Services Inc (CCS)
Type
Compilerr
Datasheet

Specifications of PCDIDE COMPILER

For Use With/related Products
Microchip PIC24/dsPIC®
Lead Free Status / RoHS Status
Not applicable / Not applicable
Other names
429-1008
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.
Variable Argument Lists
The compiler supports a variable number of parameters. This works like the ANSI requirements
except that it does not require at least one fixed parameter as ANSI does. The function can be
passed any number of variables and any data types. The access functions are VA_START,
VA_ARG, and VA_END. To view the number of arguments passed, the NARGS function can be used.
A function with variable number of parameters requires two things. First, it requires the ellipsis (...),
which must be the last parameter of the function. The ellipsis represents the variable argument list.
Second, it requires one more variable before the ellipsis (...). Usually you will use this variable as a
method for determining how many variables have been pushed onto the ellipsis.
40
funct_a(int*x,int*y){
}
funct_a(&a,&b);
funct_b(int&x,int&y){
}
funct_b(a,b);
/*
stdarg.h holds the macros and va_list data type needed for variable
number of parameters.
*/
#include <stdarg.h>
/*Traditional*/
if(*x!=5)
/*Reference params*/
if(x!=5)
*y=*x+3;
y=x+3;

Related parts for PCDIDE COMPILER