Skip to content

Commit 651263e

Browse files
authored
Merge pull request #7 from hrschupp/issue4
FIX: prevent multi-dimensional Dim from transforming into new declarations (might be numeric)
2 parents 5306357 + ca88f7d commit 651263e

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
@@ -311,6 +311,15 @@ Private Sub AddWordFromDeclaration(ByRef Declarations As String, ByVal IsProcedu
311311
Declarations = Replace(Declarations, " ", " ")
312312
Loop
313313

314+
If Not IsProcedure And Not IsEnumTypeBlock Then
315+
Do While Declarations Like "*(*,*)*"
316+
' prevent multi-dimensional Dim from transforming into new declarations (might be numeric)
317+
Pos = InStr(1, Declarations, "(")
318+
PosX = InStr(Pos, Declarations, ")")
319+
Declarations = Left(Declarations, Pos - 1) & " " & Mid(Declarations, PosX + 1)
320+
Loop
321+
End If
322+
314323
DeclArray = Split(Trim(Declarations), ",")
315324

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

0 commit comments

Comments
 (0)