References
165
declarations, index is equal to zero by default.
Pointers to functions are not supported. If necessary, a table call can always be replaced with the
switch operator.
Multidimensional arrays are not supported. If it is necessary, you can write a couple of functions,
such as:
int GetElement(int array[], int index1, int index2);
Structures (and unions) are not supported. In fact, you can always do without structures. Structures
may be required for API Windows and user DLLs operations, but as a rule only experienced
programmers should do it, such as those who know how to reach structure elements. As a tip, there are
functions, such as memcpy, which receive a void "pointer").
Enumerated types ( enum ) are not supported #define.
#define half(x) (x / 2) , are not supported. The same operations can be done with functions.
Conditional operators such as x = y == 2? 3 : 4; , are not supported; the operator "comma" outside
variable declaration is not supported. For example,
int i = 0, j = 1; is supported, but
for (i = 0, j = 1; ...) is not supported.
User functions with a variable amount of parameters are not supported. However, there are many
system functions, such as printf, with a variable number of parameters.
Declaration of user function parameters such as void array[] is not supported. The system
functions such as memcpy, have such parameters.
Logical expressions are always fully computed. It is very important to remember it, as a situation
like
char array[10];
if (i < 10 && array[i] != 0)
array[i]   =   1;
will cause an error at the execution stage, if i is greater than 9, because the expression of array[i] will be
computed. In a standard compiler such an expression is not computed, because the condition of i > 10
would cancel any further processing of the expression.
Constant expressions are always computed during execution. For example, int i = 10 * 22 will be
computed not during compilation, but during execution.
The const key word is absent.
Static variables cannot be declared inside functions.
But
Variables can be declared anywhere, not just in front of the first executed operator. For example:
void main()
{
GlobalVar = 0;
int i = 1;
// will be OK as in C++
}
Nested comments are allowed.
Expressions like array = "1234" are allowed.
Default parameter values in declared functions, as in C++, are allowed. For example, void func
(char array[],int index = 0); . Expressions can also serve as default values, for example void func(char
array[], int index = func1() + 1); .
Expressions in global variable initializers are allowed. For example:
float table[] = { sin(0), sin(0.1) };
void main()
...
}
? 2010 Phyton, Inc. Microsystems and Development Tools
相关PDF资料
CHUSBWB-2 BATT CHARGER AA/AAA W/2AAA CELLS
CK-S6-SP623-G BOARD DEV S6 WITH TX
CK-V6-ML628-G KIT VIRTEX-6 CHAR ML628
CLSD004 LED DRIVER PROGRAMMER W/CABLE
CMC484812 RACK STEEL 12X48X48 GRY
CMCQP3 PANEL INNER 25.59X15" GREY
CML12C32SLK KIT STUDENT LEARNING 16BIT HCS12
CMR-8040 RACK CABLE MANAGMNT OPEN ASSMBLY
相关代理商/技术参数
CHIPPROG-G41 功能描述:PROGRAMMER GANG 4 SOCKET RoHS:是 类别:编程器,开发系统 >> 独立编程器 系列:- 产品目录绘图:CHIPPROG-G4 标准包装:1 系列:- 类型:成组编程器 适用于相关产品:EEPROM,EPROM,FLASH,MCU,NVRAM,PLD 所含物品:编程器,线缆,CD 产品目录页面:598 (CN2011-ZH PDF) 相关产品:AE-TS56-16I-3-ND - ISP CABLEADAPTER 14-PIN HEADERAE-TS40N-ND - ADAPTER SOCKET 40-TSOP TO 40-DIPAE-TS32N-ND - ADAPTER SOCKET 32-TSOP TO 32-DIPAE-TS28-ND - ADAPTER SOCKET 28-TSOP TO 28-DIPAE-T44-P16-ND - ADAPTER SOCKET 44-QFP TO 40-DIPAE-T44-I51/505-ND - ADAPTER SOCKET 44-QFP TO 40-DIPAE-SS56-16I-ND - ADAPTER SOCKET 56-SSOP TO 40-DIPAE-SP8U-ND - ADAPTER SOCKET 8-SSOP TO 8-DIPAE-SP28U2-ND - ADAPTER SOCKET 28-SSOP TO 28-DIPAE-SP28U1-ND - ADAPTER SOCKET 28-SSOP TO 28-DIP更多...
CHIPPROG-ISP 功能描述:PROGRAMMER IN-SYSTEM UNIVERSAL RoHS:是 类别:编程器,开发系统 >> 内电路编程器、仿真器以及调试器 系列:- 产品变化通告:Development Systems Discontinuation 19/Jul/2010 标准包装:1 系列:* 类型:* 适用于相关产品:* 所含物品:*
CHIPS CAPACITOR 0.015UF 50V CERAMIC 制造商:AVX Corporation 功能描述:CHIPS CAPACITOR 0.015UF50VCERAMIC*NIC*
CHIPS-IN-DIPS 制造商:未知厂家 制造商全称:未知厂家 功能描述:ASIC
CHIPT1593CSE6327X1SA1 制造商:Infineon Technologies AG 功能描述:RF SILICON MMIC - Gel-pak, waffle pack, wafer, diced wafer on film
CHIPV6 制造商:JDSU 制造商全称:JDS Uniphase Corporation 功能描述:The industrya??s most compact 100 G test solution
CHIS-24 制造商:Mencom 功能描述: