IfStatement

class IfStatement(    val condition: Expression,     val body: Block,     val elseBody: Block?) : Statement

A conditional statement

Constructors

Link copied to clipboard
fun IfStatement(    condition: Expression,     body: Block,     elseBody: Block?)

Properties

Link copied to clipboard
val body: Block

the Block to execute if condition evaluates to true

Link copied to clipboard
val condition: Expression

the expression to be tested to determine which block to execute.

Link copied to clipboard
val elseBody: Block?

if it exists, the Block to execute if condition evaluates to false