VBC00061: Output items not separated
Severity: Error · Family: VBC (parser / concrete syntax tree) ·
Source metadata: VBSyntaxErrorInfo
Two things to print are written side by side, with nothing between them: Debug.Print 1(2), Debug.Print "a"x.
The VBE does not keep such a line as it is written. It writes a ; between the two (Debug.Print 1; (2), Debug.Print "a"; x), which prints them
the same way, right after each other. RD-VBA asks for something between them because of what reading the line costs: if a value could be followed
directly by another, then after a name, a ( could start either its arguments or a second value, and telling the two apart would mean reading every
call nested in it to its end. A space is enough: Debug.Print 1 (2) prints the two values, as Debug.Print 1; (2) does. This is so in every
statement that prints a list: Debug.Print, Print # and Write #.
A name right before parentheses is not two things to print: in Debug.Print F(2), F is called with the argument 2, as the VBE reads it too. So it
is with spaces between them: Debug.Print F (2) calls F with 2, and the VBE writes it Debug.Print F(2).
A Tab or Spc clause before an = or an & (Debug.Print Tab(2) = 5, Debug.Print Spc(2) & "x") is no comparison or concatenation, and is a
syntax error (VBC00001), as it is in MS-VBA. A clause, a space, then a negative number (Debug.Print Spc(2) - 1) is two things to
print, as the VBE reads it; without the space (Spc(2)-1), it is this error.
This code is raised by the parser, once for each statement, at the second of the first two things to print written side by side: in
Debug.Print 1(2)(3), where the VBE writes two ;, it is raised once, at (2).
As with any syntax error, no code in the project runs while a module has this error: a run is refused before any of it runs, and
Debug.Print 1(2) prints nothing (RD-VBAL §2.6.1).
How it is raised
| Situation | Example | What the VBE writes | Resolution |
|---|---|---|---|
| A value right before parentheses. | Debug.Print 1(2) |
Debug.Print 1; (2) |
Write a ; between them, or a , to print the second at the next print zone. |
| A string right before a name. | Debug.Print "a"x |
Debug.Print "a"; x |
Write a ; or a , between them. |
| A clause right before another. | Print #1, Spc(1)Tab(2) |
Print #1, Spc(1); Tab(2) |
Write a ; between them. |
In a Write # statement. |
Write #1, 1(2) |
Write #1, 1; (2) |
Write a , between them: Write #1 separates the values it writes with a comma either way. |
See also
ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca