Can VB6 reassign a value just because it's of the same type? I used a member of a structure in a parameter that will return a structure of the same type as the one used in the parameter. Wait there's more: I used that return in the parameter in another method call (nested methods). My original structure used in the innermost nested method ends up equaling the returned value. To clarify I'm using an integer value of a member of the original structure and is passed by value not reference... Does vb6 not do nested methods?
So below is a simplified illustrated example of how everything is set up:
Somehow during the call to FunctionB, "A" equals what is supposed to be "B" even after FunctionB returns.Code:'--- Returns a SomeStruct FunctionC(byVal i as integer) as SomeStruct . . . end Function FunctionA() dim A as SomeStruct . . FunctionB( FunctionC(A.SomeInt) ) . . end Function FunctionB( ByVal B as SomeStruct ) . . . end Function
Sooo yeah... any ideas?




Reply With Quote