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
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
Condition
Condition for If and While.
public bool Condition { get; set; }
Property Value
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
LineNumber
Line number of this conditional command.
public int LineNumber { get; set; }
Property Value
ReturnLineNumber
public int ReturnLineNumber { get; set; }
Property Value
Methods
Compile()
Override base.compile() because a variable always has variable = expression and this is just expression.
public override void Compile()
Exceptions
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()