#else
 
预处理器条件指令

语法

#if (expression)
' Conditionally included statements if expression is True
#else
' Conditionally included statements if expression is False
#endif

说明

#其他可以添加到#if#ifdef#ifndef块中,以便为条件表达式提供替代结果。

例子

#define MODULE_VERSION 1
Dim a As String
#if (MODULE_VERSION > 0)
  a = "发布"
#else
  a = "Beta版"
#endif
Print "程序是"; a


与QB差别

  • 新的FreeBASIC

参考