Skip to content

THEN


Control flow statement for conditional branching.

Syntax

vb
If expression Then [statement(s)] [Else [statement(s)]] [End If]

or
If expression Then : [statement(s)] [Else [statement(s)]] : End If

or
If expression Then

[statement(s)]

[ Elseif expression Then ]

[statement(s)]

[ Else ]

[statement(s)]

End If

Remark: EndIf (without blank) is also supported like in QB for backward compatibility.

Examples

See example at If...Then.

Differences from QB

  • None

See also

  • If...Then

Back to DocToc

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft