[英]trying to understand the use of #pragma region in Arduino in C++
I am using Arduino for interfacing with fingerprint module. 我正在使用Arduino与指纹模块接口。 I was trying to understand the code of fingerprint module.
我试图理解指纹模块的代码。 i know the purpose of pragma to instruct the compiler for operation.
我知道编译指示命令编译器进行操作的目的。 but i want to know how it is handled in Arduino.
但是我想知道如何在Arduino中处理它。 is it handled in linking file?
在链接文件中处理?
#pragma region -= Command_Packet Definitions =-
#pragma endregion
#pragma region -= Response_Packet Definitions =-
#pragma endregion
It is handled by preprocessor. 它由预处理器处理。 All directives starting with
#
are. 所有以
#
开头的指令都是。
#pragma region
is common in MSVC code but may not be recognized by other compilers. #pragma region
在MSVC代码中很常见,但其他编译器可能无法识别。 #pragma
s are often nonportable. #pragma
通常是不可移植的。 So when coding, it's better to avoid #pragma
. 因此,在编码时,最好避免
#pragma
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.