Pre-Processor
Examples: #define
a=a+BITS;
BITS 8
//same as
a=a+8;
#define hi(x)
(x<<4)
a=hi(a);
//same as
a=(a<<4);
#define isequal(a,b)
(primary_##a[b]==backup_##a[b])
// usage iseaqual(names,5)
is the same as
// (primary_names[5]==backup_names[5])
#define str(s)
#s
#define part(device)
#include str(device##.h)
// usage part(16F887) is the same as
// #include "16F887.h"
Example
Files:
Also See:
#UNDEF, #IFDEF, #IFNDEF
#DEFINEDINC
Syntax:
value = definedinc( variable );
Parameters: variable is the name of the variable, function, or type to be checked.
Returns:
Function:
Availability:
Requires:
A C status for the type of id entered as follows:
0 – not known
1 – typedef or enum
2 – struct or union type
3 – typemod qualifier
4 – defined function
5 – function prototype
6 – compiler built-in function
7 – local variable
8 – global variable
This function checks the type of the variable or function being passed in and returns a specific C
status based on the type.
All devices
None.
Examples:
Example
Files:
Also See:
int x, y = 0;
y = definedinc( x );
None
None
// y will return 7 – x is a local variable
87
相关PDF资料
PCI-EXP-T42G5-N1 IP CORE PCI EXPRESS ORCA 4
PCM18XH2 PROCESSOR MODULE MPLAB-ICE 2000
PCM18XN0 PROCESSOR MODULE FOR ICE2000
PDA-B-24-615-E-2B1-1-C CIRCUIT BREAKER MAG 1P 15A
PFMF.260.2 PFMF PTC FUSE SMT 2.6A 1812
PFNF.200.2 PFNF PTC FUSE SMT 2A 1206
PFRY.375 PTC-FUSE RADIAL 72 VDC
PFSM.150.33.2 FUSE PTC 8A 15V FST-TRIP SMD
相关代理商/技术参数
PCD_09 制造商:MACOM 制造商全称:Tyco Electronics 功能描述:Low Profile PCB Relay PCD
PCD-00173-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0E 制造商:Molex 功能描述:Ethernet Cable Assembly
PCD-00173-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0K 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00174-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Red; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet ;RoHS Compliant: NA
PCD-00174-0E 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Grey; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet;RoHS Compliant: NA
PCD-00174-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY