这在编程中意味着什么 [英] What Does This Means In Programming
本文介绍了这在编程中意味着什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
0x00002这在编程中意味着什么?我来到它的整个地段和类似的数字也喜欢它。
示例:
0x00002 What Does This Means In Programming ? I Come Across It A whole Lot And Similar Numbers Like it Also.
Example :
#include "compiler.h"
#include "preprocessor.h"
#include "board.h"
#include "gpio.h"
#include "sysclk.h"
#include "at45dbx.h"
#include "conf_data_flash_example.h"
//Macros
#define TARGET_SECTOR 0x00002
''Functions
int main (void)
Main function. More...
void test_ko (void)
//Variables
uint8_t ram_buf [AT45DBX_SECTOR_SIZE]
#define TARGET_SECTOR 0x00002
由main()引用。
Referenced by main().
推荐答案
0x告诉编译器您正在以十六进制格式说明该值。
编译器将0x00002计算为值为2的整数。
编译器使用整数值每当引用名称TARGET_SECTOR时为2。
The "0x" tells the compiler that you are stating the value in a hexadecimal format.
The compiler evaluates the 0x00002 to an integer of value 2.
The compiler uses an integer value of 2 whenever the name TARGET_SECTOR is referenced.
这意味着两个。
这篇关于这在编程中意味着什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文