RepeatStatement

Overview

RepeatStatement is a class that can hold a repeat/until statement. It will always execute the body of the loop at least once, then it checks the condition, if it's true it will break out of the loop, else it will execute the body again until the condition is true.

Location


 

constructor

Constructor that does not initialize any fields.

 

constructor

 

RepeatStatement()

 

init()

 

RepeatStatement()

 

Sub New()

constructor (Value, Statement)

Create a new empty instance of this class

 

constructor(aCondition: Value; aBody: Statement)

 

RepeatStatement(Value aCondition, Statement aBody)

 

init(_ aCondition: Value, _ aBody: Statement)

 

RepeatStatement(Value aCondition, Statement aBody)

 

Sub New(aCondition As Value, aBody As Statement)

Parameters:

  • aCondition: Condition to break on
  • aBody: Body for this repeat statement

Body

Body for this method

 

property Body: Statement read write;

 

Statement Body { get; set; }

 

var Body: Statement { get{} set{} }

 

Statement Body { __get; __set; }

 

Property Body() As Statement

BuildStatement

Converts a statement to a string.

 

method BuildStatement(anIndent: Int32; sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

func BuildStatement(_ anIndent: Int32, _ sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

Sub BuildStatement(anIndent As Int32, sb As StringBuilder)

Parameters:

  • anIndent: The nr of spaces to place before the start of this statement.
  • sb: Output string builder.

Condition

Until condition for this loop

 

property Condition: Value read write;

 

Value Condition { get; set; }

 

var Condition: Value { get{} set{} }

 

Value Condition { __get; __set; }

 

Property Condition() As Value

Kind

Returns what kind of statement this is; this can be used to find out if a statement is of a specific type without having to check all possible casts

 

property Kind: StatementKind read;

 

StatementKind Kind { get; }

 

var Kind: StatementKind { get{} }

 

StatementKind Kind { __get; }

 

ReadOnly Property Kind() As StatementKind

OverflowCheck    (declared in Statement)

Overflow checking for binary and unary operations in this statement

 

property OverflowCheck: Boolean read write;

 

Boolean OverflowCheck { get; set; }

 

var OverflowCheck: Boolean { get{} set{} }

 

Boolean OverflowCheck { __get; __set; }

 

Property OverflowCheck() As Boolean

Position    (declared in Statement)

Position this statement is defined at

 

property Position: IPosition read write;

 

IPosition Position { get; set; }

 

var Position: IPosition { get{} set{} }

 

IPosition Position { __get; __set; }

 

Property Position() As IPosition

SetOverflowCheckRecursive

Recursively sets the OverflowCheck flag

 

method SetOverflowCheckRecursive(value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

func SetOverflowCheckRecursive(_ value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

Sub SetOverflowCheckRecursive(value As Boolean)

Parameters:

  • value: new value

ToString    (declared in Statement)

Returns this statement as a string

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToValue

Converts this statement to a value tree that creates these statements

 

method ToValue(aServicesParameter: Value; aServices: IServices): Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

func ToValue(_ aServicesParameter: Value, _ aServices: IServices) -> Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

Function ToValue(aServicesParameter As Value, aServices As IServices) As Value

Parameters:

  • aServicesParameter: the value that contains where aServices is stored
  • aServices: Actual services instance.

 

Body

Body for this method

 

property Body: Statement read write;

 

Statement Body { get; set; }

 

var Body: Statement { get{} set{} }

 

Statement Body { __get; __set; }

 

Property Body() As Statement

Condition

Until condition for this loop

 

property Condition: Value read write;

 

Value Condition { get; set; }

 

var Condition: Value { get{} set{} }

 

Value Condition { __get; __set; }

 

Property Condition() As Value

Kind

Returns what kind of statement this is; this can be used to find out if a statement is of a specific type without having to check all possible casts

 

property Kind: StatementKind read;

 

StatementKind Kind { get; }

 

var Kind: StatementKind { get{} }

 

StatementKind Kind { __get; }

 

ReadOnly Property Kind() As StatementKind

OverflowCheck    (declared in Statement)

Overflow checking for binary and unary operations in this statement

 

property OverflowCheck: Boolean read write;

 

Boolean OverflowCheck { get; set; }

 

var OverflowCheck: Boolean { get{} set{} }

 

Boolean OverflowCheck { __get; __set; }

 

Property OverflowCheck() As Boolean

Position    (declared in Statement)

Position this statement is defined at

 

property Position: IPosition read write;

 

IPosition Position { get; set; }

 

var Position: IPosition { get{} set{} }

 

IPosition Position { __get; __set; }

 

Property Position() As IPosition

 

constructor

Constructor that does not initialize any fields.

 

constructor

 

RepeatStatement()

 

init()

 

RepeatStatement()

 

Sub New()

constructor (Value, Statement)

Create a new empty instance of this class

 

constructor(aCondition: Value; aBody: Statement)

 

RepeatStatement(Value aCondition, Statement aBody)

 

init(_ aCondition: Value, _ aBody: Statement)

 

RepeatStatement(Value aCondition, Statement aBody)

 

Sub New(aCondition As Value, aBody As Statement)

Parameters:

  • aCondition: Condition to break on
  • aBody: Body for this repeat statement

BuildStatement

Converts a statement to a string.

 

method BuildStatement(anIndent: Int32; sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

func BuildStatement(_ anIndent: Int32, _ sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

Sub BuildStatement(anIndent As Int32, sb As StringBuilder)

Parameters:

  • anIndent: The nr of spaces to place before the start of this statement.
  • sb: Output string builder.

SetOverflowCheckRecursive

Recursively sets the OverflowCheck flag

 

method SetOverflowCheckRecursive(value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

func SetOverflowCheckRecursive(_ value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

Sub SetOverflowCheckRecursive(value As Boolean)

Parameters:

  • value: new value

ToString    (declared in Statement)

Returns this statement as a string

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToValue

Converts this statement to a value tree that creates these statements

 

method ToValue(aServicesParameter: Value; aServices: IServices): Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

func ToValue(_ aServicesParameter: Value, _ aServices: IServices) -> Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

Function ToValue(aServicesParameter As Value, aServices As IServices) As Value

Parameters:

  • aServicesParameter: the value that contains where aServices is stored
  • aServices: Actual services instance.