Skip to content

Commit 0d7bc74

Browse files
committed
v3.2.4
1 parent 5233374 commit 0d7bc74

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

src/LO Basic/VBAExpressionsLib/TestVBAExpr.xba

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,11 @@ Sub RunAllTests
332332
"C = {{-1;13};{6;15}}" _
333333
)
334334
VarOverload("Variables overloading: indirect assignment")
335-
335+
Run( _
336+
"Excel BETA.DIST function test", _
337+
"ROUND(IBETA((2-1)/(3-1);8;10);4)", _
338+
"0.6855" _
339+
)
336340
SF_Exception.debugprint("Passed tests:",sAcum)
337341
SF_Exception.debugprint("Failed tests:",tTotal - sAcum)
338342
SF_Exception.debugprint("Passed tests Ratio:",Round(100*sAcum/tTotal,2) &"%")
@@ -445,4 +449,10 @@ TestFail:
445449
SF_Exception.debugprint("Test " & testName & " raised an error: #" & err.Number & " - " & err.Description)
446450
Resume TestExit
447451
End Sub
452+
sub tesover
453+
'msgbox ("a{2}" Like "[A-Zaz]*{*}")
454+
SF_Exception.consoleClear()
455+
call VarOverload("Variables overloading: indirect assignment")
456+
SF_Exception.console()
457+
end sub
448458
</script:module>

src/LO Basic/VBAExpressionsLib/VBAexpressions.xba

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ Private Sub Class_Initialize()
341341
InitCBbuffer UserDefFunctions
342342
&apos;@--------------------------------------------------------------------
343343
&apos; Populate linked index constructor
344-
LIndexConstruc(0) = d_lCurly
345-
LIndexConstruc(2) = d_rCurly
344+
LIndexConstruc(0) = d_lSquareB
345+
LIndexConstruc(2) = d_rSquareB
346346
&apos;@--------------------------------------------------------------------
347347
&apos; Populate building UDFs
348348
Dim UDFnames() As Variant
@@ -4019,8 +4019,11 @@ Private Function GetFunctionName(ByRef expression As String) As String
40194019
If GFNbool Then
40204020
GetFunctionName = UserDefFunctions.Storage(i).aName
40214021
Else
4022-
If expression Like &quot;[A-Zaz]*{*}&quot; Then &apos;Not defined function bypass
4023-
tmpPos = strVBA.InStrB(1, expression, d_lCurly)
4022+
ExpCopy = Replace(Replace( _
4023+
expression,d_lSquareB,d_lCurly,1), _
4024+
d_rSquareB,d_rCurly,1) &apos;Bypass LO Basic LIKE OP limitation
4025+
If (ExpCopy Like &quot;[A-Zaz]*{*}&quot;) Then &apos;Not defined function bypass
4026+
tmpPos = strVBA.InStrB(1, expression, d_lSquareB)
40244027
GetFunctionName = strVBA.MidB(expression, 1, tmpPos - 1)
40254028
End If
40264029
End If
@@ -4031,9 +4034,9 @@ Private Function GetIndex(ByRef SubstStr As String) As Long
40314034
Dim InitPos As Long
40324035
Dim EndPos As Long
40334036

4034-
InitPos = strVBA.InStrB(1, SubstStr, d_lCurly)
4037+
InitPos = strVBA.InStrB(1, SubstStr, d_lSquareB)
40354038
If InitPos Then
4036-
EndPos = strVBA.InStrB(1, SubstStr, d_rCurly)
4039+
EndPos = strVBA.InStrB(1, SubstStr, d_rSquareB)
40374040
If EndPos Then
40384041
GetIndex = strVBA.MidB(SubstStr, InitPos + 2, EndPos - InitPos - 2)
40394042
Else
@@ -4563,7 +4566,7 @@ End Function
45634566

45644567
&apos;&apos;&apos; &lt;summary&gt;
45654568
&apos;&apos;&apos; Returns an array with all the sub expressions needed to
4566-
&apos;&apos;&apos; evaluate the given expression. A string such as {0}
4569+
&apos;&apos;&apos; evaluate the given expression. A string such as [0]
45674570
&apos;&apos;&apos; indicates that the current token should be evaluated using
45684571
&apos;&apos;&apos; the value or token residing at index 0 using functions
45694572
&apos;&apos;&apos; and arithmetic operators.

0 commit comments

Comments
 (0)