testbed:while循环宏替换

[复制链接]
 楼主| keer_zu 发表于 2023-2-18 15:03 | 显示全部楼层 |阅读模式
 楼主| keer_zu 发表于 2023-2-18 15:06 | 显示全部楼层
  1. /*
  2. * Pre-include code will be placed here
  3. * this code is located at global scope and should consist of
  4. * declarations, preprocessor directives (e.g. #include) or procedures
  5. */
  6. static int loopValue=0;

  7. int stub(void) {
  8.   if(loopValue==0) {
  9.     loopValue=1;
  10.   }else {
  11.     loopValue=0;
  12.   }
  13.   return loopValue;
  14. }

  15. #define while(expression) while(stub())


 楼主| keer_zu 发表于 2023-2-18 15:07 | 显示全部楼层
  1. /*
  2. * Post-include code will be placed here
  3. * this code is located at global scope and should consist of
  4. * declarations, preprocessor directives (e.g. #include) or procedures
  5. */
  6. #undef while(expression)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:qq群:49734243 Email:zukeqiang@gmail.com

1478

主题

12917

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部
个人签名:qq群:49734243 Email:zukeqiang@gmail.com

1478

主题

12917

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部