Table of Contents

Class Array

Namespace
BOOSE
Assembly
BOOSE.dll

An array of integers or reals. array int myArray 10,2\narray real prices 10\n[array][(type)][(size)][(optional dimentions, 1 if not given)]

public class Array : Evaluation, ICommand
Inheritance
Array
Implements
Derived
Inherited Members

Constructors

Array()

Contructor calls restrictions.

public Array()

Fields

PEEK

protected const bool PEEK = false

Field Value

bool

POKE

public const bool POKE = true

Field Value

bool

column

protected int column

Field Value

int

columnS

protected string columnS

Field Value

string

columns

protected int columns

Field Value

int

intArray

protected int[,] intArray

Field Value

int[,]

peekVar

protected string peekVar

Field Value

string

pokeValue

protected string pokeValue

Field Value

string

realArray

protected double[,] realArray

Field Value

double[,]

row

protected int row

Field Value

int

rowS

protected string rowS

Field Value

string

rows

protected int rows

Field Value

int

type

protected string type

Field Value

string

valueInt

protected int valueInt

Field Value

int

valueReal

protected double valueReal

Field Value

double

Properties

Columns

Dimensions of the array, 1 is default if no parameter is supplied.

protected int Columns { get; }

Property Value

int

Rows

Size of the array.

protected int Rows { get; }

Property Value

int

Methods

ArrayRestrictions()

public void ArrayRestrictions()

CheckParameters(string[])

Checks that there are 3 or 4 parameters.. array (size) (optional dimension)

public override void CheckParameters(string[] parameterList)

Parameters

parameterList string[]

Compile()

Ensure array is correctly declared

public override void Compile()

Exceptions

CommandException

Execute()

Evaluate any expression and store the evaluatedExpression result in instance data for sub classes. Expressions are evaluated at runtime by a StoredProgram object (Program)

public override void Execute()

GetIntArray(int, int)

public virtual int GetIntArray(int row, int col)

Parameters

row int
col int

Returns

int

GetRealArray(int, int)

public virtual double GetRealArray(int row, int col)

Parameters

row int
col int

Returns

double

ProcessArrayParametersCompile(bool)

Peek and Poke are very similar in syntax but not identical, so processing them has to be done slightly differently.

protected virtual void ProcessArrayParametersCompile(bool peekOrPoke)

Parameters

peekOrPoke bool

Exceptions

CommandException

ProcessArrayParametersExecute(bool)

Set up the object with parsed row and column (from any expressions). Used by Peek and Poke at runtime.

protected virtual void ProcessArrayParametersExecute(bool peekOrPoke)

Parameters

peekOrPoke bool

Exceptions

CommandException

SetIntArray(int, int, int)

public virtual void SetIntArray(int val, int row, int col)

Parameters

val int
row int
col int

SetRealArray(double, int, int)

public virtual void SetRealArray(double val, int row, int col)

Parameters

val double
row int
col int