Table of Contents

Enum VBErlLineNumbering

Namespace
RDCore.SDK.Runtime.Abstract.Execution
Assembly
RDCore.SDK.dll

What Erl counts as the line a run-time error was raised at.

public enum VBErlLineNumbering

Fields

DocumentLine = 0

The line the faulting statement is really on, counted from 1 as an editor counts it.

The default: it answers the question the caller is actually asking, for any code at all, and it never names a line the fault was not on.

LineLabel = 1

The last line-number label at or before the faulting statement, or 0 when none precedes it — bug for bug with MS-VBA.

For source that carries a line number on every line, this is the document line, which is why it is the right answer for a numbered BASIC program and the wrong one for everything else. Choose it when a workspace's own code depends on MS-VBA's behaviour.

Remarks

🎯 An RD-VBA dial, because MS-VBA's own answer is not a useful one. Erl there reports the last line-number label it passed, and hardly any code numbers every line — so a fault in an unnumbered statement is reported at whichever numbered line came before it, however far back that is, and a program that numbers nothing is told every error happened at line 0. The number is truthful only for a program in which every single line is numbered, which is to say a BASIC program.