ForInStatement

Overview

This class represents a for each ... in ... do loop. The variable name/type is the implicitly created variable for this for each loop. The index variable and type is an optional extra parameter, that will count from 0 on and can be used to find out the current index into the sequence, if used.

Location


 

constructor

Constructor that does not initialize any fields.

 

constructor

 

ForInStatement()

 

init()

 

ForInStatement()

 

Sub New()

Initialize a new for in loop

 

constructor(aName: String; aType: IType; aMatching: Boolean; aSource: Value; aBody: Statement; aIndexName: String; aIndexType: IType; aParallel: Boolean)

 

ForInStatement(String aName, IType aType, Boolean aMatching, Value aSource, Statement aBody, String aIndexName, IType aIndexType, Boolean aParallel)

 

init(_ aName: String, _ aType: IType, _ aMatching: Boolean, _ aSource: Value, _ aBody: Statement, _ aIndexName: String, _ aIndexType: IType, _ aParallel: Boolean)

 

ForInStatement(String aName, IType aType, Boolean aMatching, Value aSource, Statement aBody, String aIndexName, IType aIndexType, Boolean aParallel)

 

Sub New(aName As String, aType As IType, aMatching As Boolean, aSource As Value, aBody As Statement, aIndexName As String, aIndexType As IType, aParallel As Boolean)

Parameters:

  • aName: Name of the for in variable to create
  • aType: element type for the for in
  • aMatching: if set only runs abody when the element is of that type
  • aSource: Source enumerable
  • aBody: statement to run for each item
  • aIndexName: Optional indexer name
  • aIndexType: Optional type for the indexer
  • aParallel: If true, runs the code in parallel

Body

Statement body

 

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.

IndexName

Name of the index variable name, the counter for the index in this loop, if needed; NIL means it's not generated

 

property IndexName: String read write;

 

String IndexName { get; set; }

 

var IndexName: String { get{} set{} }

 

String IndexName { __get; __set; }

 

Property IndexName() As String

IndexType

IndexType is the type of the index variable, Usually System.Int32

 

property IndexType: IType read write;

 

IType IndexType { get; set; }

 

var IndexType: IType { get{} set{} }

 

IType IndexType { __get; __set; }

 

Property IndexType() As IType

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

Matching

Only return items where the type matches the list

 

property Matching: Boolean read write;

 

Boolean Matching { get; set; }

 

var Matching: Boolean { get{} set{} }

 

Boolean Matching { __get; __set; }

 

Property Matching() As Boolean

Name

Name of the local introduced

 

property Name: String read write;

 

String Name { get; set; }

 

var Name: String { get{} set{} }

 

String Name { __get; __set; }

 

Property Name() As String

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

Parallel

Run in parallel

 

property Parallel: Boolean read write;

 

Boolean Parallel { get; set; }

 

var Parallel: Boolean { get{} set{} }

 

Boolean Parallel { __get; __set; }

 

Property Parallel() 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

Source

Source collection for the for loop

 

property Source: Value read write;

 

Value Source { get; set; }

 

var Source: Value { get{} set{} }

 

Value Source { __get; __set; }

 

Property Source() As 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.

Type

Type of the local introduced in for/in

 

property Type: IType read write;

 

IType Type { get; set; }

 

var Type: IType { get{} set{} }

 

IType Type { __get; __set; }

 

Property Type() As IType

 

Body

Statement body

 

property Body: Statement read write;

 

Statement Body { get; set; }

 

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

 

Statement Body { __get; __set; }

 

Property Body() As Statement

IndexName

Name of the index variable name, the counter for the index in this loop, if needed; NIL means it's not generated

 

property IndexName: String read write;

 

String IndexName { get; set; }

 

var IndexName: String { get{} set{} }

 

String IndexName { __get; __set; }

 

Property IndexName() As String

IndexType

IndexType is the type of the index variable, Usually System.Int32

 

property IndexType: IType read write;

 

IType IndexType { get; set; }

 

var IndexType: IType { get{} set{} }

 

IType IndexType { __get; __set; }

 

Property IndexType() As IType

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

Matching

Only return items where the type matches the list

 

property Matching: Boolean read write;

 

Boolean Matching { get; set; }

 

var Matching: Boolean { get{} set{} }

 

Boolean Matching { __get; __set; }

 

Property Matching() As Boolean

Name

Name of the local introduced

 

property Name: String read write;

 

String Name { get; set; }

 

var Name: String { get{} set{} }

 

String Name { __get; __set; }

 

Property Name() As String

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

Parallel

Run in parallel

 

property Parallel: Boolean read write;

 

Boolean Parallel { get; set; }

 

var Parallel: Boolean { get{} set{} }

 

Boolean Parallel { __get; __set; }

 

Property Parallel() 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

Source

Source collection for the for loop

 

property Source: Value read write;

 

Value Source { get; set; }

 

var Source: Value { get{} set{} }

 

Value Source { __get; __set; }

 

Property Source() As Value

Type

Type of the local introduced in for/in

 

property Type: IType read write;

 

IType Type { get; set; }

 

var Type: IType { get{} set{} }

 

IType Type { __get; __set; }

 

Property Type() As IType

 

constructor

Constructor that does not initialize any fields.

 

constructor

 

ForInStatement()

 

init()

 

ForInStatement()

 

Sub New()

Initialize a new for in loop

 

constructor(aName: String; aType: IType; aMatching: Boolean; aSource: Value; aBody: Statement; aIndexName: String; aIndexType: IType; aParallel: Boolean)

 

ForInStatement(String aName, IType aType, Boolean aMatching, Value aSource, Statement aBody, String aIndexName, IType aIndexType, Boolean aParallel)

 

init(_ aName: String, _ aType: IType, _ aMatching: Boolean, _ aSource: Value, _ aBody: Statement, _ aIndexName: String, _ aIndexType: IType, _ aParallel: Boolean)

 

ForInStatement(String aName, IType aType, Boolean aMatching, Value aSource, Statement aBody, String aIndexName, IType aIndexType, Boolean aParallel)

 

Sub New(aName As String, aType As IType, aMatching As Boolean, aSource As Value, aBody As Statement, aIndexName As String, aIndexType As IType, aParallel As Boolean)

Parameters:

  • aName: Name of the for in variable to create
  • aType: element type for the for in
  • aMatching: if set only runs abody when the element is of that type
  • aSource: Source enumerable
  • aBody: statement to run for each item
  • aIndexName: Optional indexer name
  • aIndexType: Optional type for the indexer
  • aParallel: If true, runs the code in parallel

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.