1Aug/082
Convoluted Code
Honestly, what does this function do?
Private Function VarN( _
ByRef VarName As String, _
Optional ByRef Value As Object = Nothing) _
As Object
On Error Resume Next
Static aVarName() As Object
Static aVarValue() As Object
Dim iFound As Integer
Dim ret As Object
If IsNothing(Value) Then
iFound = aFind(aVarName, VarName)
If iFound > -1 Then
ret = aVarValue(iFound)
End If
ElseIf Left(VarName, 1) "~" Then
If VarName = "A" Then
ret = VB6.CopyArray(aVarName)
ElseIf VarName = "B" Then
ret = VB6.CopyArray(aVarValue)
ElseIf VarName = "C" Then 'clear memvars
Erase aVarName
Erase aVarValue
End If
Else
iFound = aFind(aVarName, VarName)
If iFound = -1 Then
aAdd(aVarName, VarName)
aAdd(aVarValue, Value)
Else
aVarName(iFound) = VarName
aVarValue(iFound) = Value
End If
End If
Return ret
End Function
August 2nd, 2008 - 10:33
Booooo!!!
August 4th, 2008 - 19:58
In addition to the obfuscated code, why the use of Objects for most variables?
Cheese!