Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
0x00002 What Does This Means In Programming ? I Come Across It A whole Lot And Similar Numbers Like it Also.
Example :
C
#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

Referenced by main().
Posted
Updated 5-Jul-14 11:16am
v2

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.
 
Share this answer
 
It means two.
 
Share this answer
 
Comments
[no name] 5-Jul-14 16:31pm    
Could you be more exact please? Thanks for the giggle.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900