some question about macro define

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

some question about macro define

612 次查看
100asong
Contributor I

1.For example,"#define Days 365 " macro definition sentence can been defined in code area and ram area?

2.There are some difference about these 2 area?

标签 (1)
0 项奖励
1 回复

297 次查看
CrasyCat
Specialist III

Hello

 

I am not sure I understand the question here.

 

The statement ,"#define Days 365" is basically a macro definition.

The pre-processor will basically replace all occurrence of Days by 365 at the very beginning of the build process.

 

As such a macro does not occupy any space in either ROM or RAM.

 

CrasyCat

0 项奖励