Table of Contents

Class ConditionalCommand

Namespace
BOOSE
Assembly
BOOSE.dll

Used for Ifs, Whiles and Fors

public class ConditionalCommand : Boolean, ICommand
Inheritance
ConditionalCommand
Implements
Derived
Inherited Members

Fields

endLineNumber

protected int endLineNumber

Field Value

int

Properties

CondType

Link end [type of conditional] to conditional, so compiler can tell if end end does not match

public ConditionalCommand.conditionalTypes CondType { get; set; }

Property Value

ConditionalCommand.conditionalTypes

Condition

Condition for If and While.

public bool Condition { get; set; }

Property Value

bool

EndLineNumber

Line number of corresponding "end" command for this conditional command (so when executed it can jump straight to it).

public int EndLineNumber { get; set; }

Property Value

int

LineNumber

Line number of this conditional command.

public int LineNumber { get; set; }

Property Value

int

ReturnLineNumber

public int ReturnLineNumber { get; set; }

Property Value

int

Methods

Compile()

Override base.compile() because a variable always has variable = expression and this is just expression.

public override void Compile()

Exceptions

VarException

Execute()

Called when program is executed. Determines if condition is true or false. If false then jumps to corrensponding "end" command.

public override void Execute()

Exceptions

CommandException