#ELSEIFDEF
- 来源: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgPpelseifdef
- 最后更新: 2023-10-02
预处理器条件指令
语法
vb
#ifdef A
' Conditionally included statements if A is defined
#elseifdef B
' Conditionally included statements if A is not defined and B is defined
#else
' Conditionally included statements if both A and B are not defined
#endif说明
#elseifdef 可添加到 #if 块中,以提供额外的条件。
#elseifdef symbol 等价于 #elseif defined (symbol)
示例
start GeSHi
vb
#DEFINE B
#IFDEF A
Print "A is defined"
#ELSEIFDEF B
Print "A is not defined and B is defined"
#ELSE
Print "both A and B are not defined"
#ENDIFend GeSHi
版本
- 自 fbc 1.20.0 起
与 QB 的区别
- FreeBASIC 新增
另请参阅
#define#macro#if#else#elseif#elseifndef#endif#ifdef#ifndef#undefdefined
返回 目录