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
OpenerintThe index of the block's opener in the program's statements: its
If,Select Case,For,Do,WhileorWithline.BranchintThe index of the line that starts the block's last branch at or before the line: an
ElseIf, anElse, aCaseor aCase Elseline;Openerwhen the block has no branch there.CloserstringThe keywords that close the block:
End If,End Select,Next,Loop,WendorEnd With.HasBodyboolWhether 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
Closer
The keywords that close the block: End If, End Select, Next, Loop, Wend or End With.
public string Closer { get; init; }
Property Value
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
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; }