Table of Contents

Struct ProgramBlock

Namespace
RDCore.SDK.Formatting
Assembly
RDCore.SDK.dll

A block of a program of the platform's BASIC (BasicProgramText) that is open at one of its lines: its opener is at or before the line, and the program has no closer for it.

public readonly record struct ProgramBlock : IEquatable<ProgramBlock>
Implements
Inherited Members

Constructors

ProgramBlock(int, int, string, bool)

A block of a program of the platform's BASIC (BasicProgramText) that is open at one of its lines: its opener is at or before the line, and the program has no closer for it.

public ProgramBlock(int Opener, int Branch, string Closer, bool HasBody)

Parameters

Opener int

The index of the block's opener in the program's statements: its If, Select Case, For, Do, While or With line.

Branch int

The index of the line that starts the block's last branch at or before the line: an ElseIf, an Else, a Case or a Case Else line; Opener when the block has no branch there.

Closer string

The keywords that close the block: End If, End Select, Next, Loop, Wend or End With.

HasBody bool

Whether the line comes after Branch, so that the block's last branch has a statement at or before the line.

Properties

Branch

The index of the line that starts the block's last branch at or before the line: an ElseIf, an Else, a Case or a Case Else line; Opener when the block has no branch there.

public int Branch { get; init; }

Property Value

int

Closer

The keywords that close the block: End If, End Select, Next, Loop, Wend or End With.

public string Closer { get; init; }

Property Value

string

HasBody

Whether the line comes after Branch, so that the block's last branch has a statement at or before the line.

public bool HasBody { get; init; }

Property Value

bool

Opener

The index of the block's opener in the program's statements: its If, Select Case, For, Do, While or With line.

public int Opener { get; init; }

Property Value

int