Class Method
- Namespace
- BOOSE
- Assembly
- BOOSE.dll
Method declaration command. Overcoming method restrictions will require a complete rewrite. It would be simpler to do this after Parser and StoredProgram. You are getting to the stage where you need to do a big rewrite.
public class Method : CompoundCommand, ICommand
- Inheritance
-
Method
- Implements
- Inherited Members
Constructors
Method()
The Call inserts it's line number in here so the method end can return.
public Method()
Properties
LocalVariables
Get parameter list of the method, treated as local variable. They will be deleted when execution leave the method.
public string[] LocalVariables { get; }
Property Value
- string[]
MethodName
Get method name, so a parser can append it to local variables/parameters.
public string MethodName { get; }
Property Value
Type
Return type of method
public string Type { get; }
Property Value
Methods
CheckParameters(string[])
Does nothing in this case.
public override void CheckParameters(string[] parameter)
Parameters
parameter
string[]
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()