文件名称:embeded
介绍说明--下载内容均来自于网络,请自行研究使用
预处理器(Preprocessor)
1. 用预处理指令#define 声明一个常数,用以表明1年中有多少秒(忽略闰年问题)
#define SECONDS_PER_YEAR (60 * 60 * 24 * 365)UL
我在这想看到几件事情:
1). #define 语法的基本知识(例如:不能以分号结束,括号的使用,等等)
2). 懂得预处理器将为你计算常数表达式的值,因此,直接写出你是如何计算一年中有多少秒而不是计算出实际的值,是更清晰而没有代价的。
3). 意识到这个表达式将使一个16位机的整型数溢出-因此要用到长整型符号L,告诉编译器这个常数是的长整型数。
4). 如果你在你的表达式中用到UL(表示无符号长整型),那么你有了一个好的起点。记住,第一印象很重要。
。。。。。。
-The processor (Preprocessor) 1. With preprocessing directives# create a profile for a resource declare a constant, to indicate that 1 years how many seconds (ignoring a leap year problem) Create a profile for a resource# SECONDS_PER_YEAR (60* 60** 365) UL 24 I want to see a few things: Create a profile for a resource# 1). The basic grammar knowledge (for example: can t with semicolon, the use of brackets, etc.) 2). Know the processor will be in your calculation constant expression value, so, write you is how to calculate the direct a year rather than how many seconds to figure out the actual value, is the more clear and no cost. 3). To realize this expression will make a 16-bit machine integer overflow-so to use long integer symbols, tell the compiler L the constant is yes long integer. 4). If you in your expression used UL (said unsigned long integer), then you have a good starting point. Remember, the first impression is very important. ......
1. 用预处理指令#define 声明一个常数,用以表明1年中有多少秒(忽略闰年问题)
#define SECONDS_PER_YEAR (60 * 60 * 24 * 365)UL
我在这想看到几件事情:
1). #define 语法的基本知识(例如:不能以分号结束,括号的使用,等等)
2). 懂得预处理器将为你计算常数表达式的值,因此,直接写出你是如何计算一年中有多少秒而不是计算出实际的值,是更清晰而没有代价的。
3). 意识到这个表达式将使一个16位机的整型数溢出-因此要用到长整型符号L,告诉编译器这个常数是的长整型数。
4). 如果你在你的表达式中用到UL(表示无符号长整型),那么你有了一个好的起点。记住,第一印象很重要。
。。。。。。
-The processor (Preprocessor) 1. With preprocessing directives# create a profile for a resource declare a constant, to indicate that 1 years how many seconds (ignoring a leap year problem) Create a profile for a resource# SECONDS_PER_YEAR (60* 60** 365) UL 24 I want to see a few things: Create a profile for a resource# 1). The basic grammar knowledge (for example: can t with semicolon, the use of brackets, etc.) 2). Know the processor will be in your calculation constant expression value, so, write you is how to calculate the direct a year rather than how many seconds to figure out the actual value, is the more clear and no cost. 3). To realize this expression will make a 16-bit machine integer overflow-so to use long integer symbols, tell the compiler L the constant is yes long integer. 4). If you in your expression used UL (said unsigned long integer), then you have a good starting point. Remember, the first impression is very important. ......
(系统自动生成,下载前可以参看下载内容)
下载文件列表
embeded.doc