如果需要使用 #ifdef
#endif 对来合并操作、添加特定于编译器的关键字或添加 #pragma 伪指令,可以为操作设置 SpecificationProlog、SpecificationEpilog、ImplementationProlog 和 ImplementationEpilog 属性。
关于此任务
例如,要指定仅当使用 _DEBUG 编译代码时某操作才可用:
- 将 SpecificationProlog 设置为 #ifdef
_DEBUG <CR>。
- 将 SpecificationEpilog 设置为 #endif。
- 将 ImplementationProlog 设置为 #ifdef
_DEBUG <CR>。
- 将 ImplementationEpilog 设置为 #endif。
这些属性对于配置、包、类和特性可用。
有关这些属性的相信定义,请参阅“特征”窗口中显示的属性定义。