Skip to content

Commit ca88f7d

Browse files
committed
FIX: prevent multi-dimensional Dim from transforming into new declarations (might be numeric)
1 parent 1b2f48a commit ca88f7d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/modules/DeclarationDict.cls

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,15 @@ Private Sub AddWordFromDeclaration(ByRef Declarations As String, ByVal IsProcedu
305305
Declarations = Replace(Declarations, " ", " ")
306306
Loop
307307

308+
If Not IsProcedure And Not IsEnumTypeBlock Then
309+
Do While Declarations Like "*(*,*)*"
310+
' prevent multi-dimensional Dim from transforming into new declarations (might be numeric)
311+
Pos = InStr(1, Declarations, "(")
312+
PosX = InStr(Pos, Declarations, ")")
313+
Declarations = Left(Declarations, Pos - 1) & " " & Mid(Declarations, PosX + 1)
314+
Loop
315+
End If
316+
308317
DeclArray = Split(Trim(Declarations), ",")
309318

310319
For i = LBound(DeclArray) To UBound(DeclArray)

0 commit comments

Comments
 (0)