|
-
May 5th, 2008, 03:14 PM
#2
Re: Side question about UDTs
VB6 saves variable names globally...
For example, make 2 functions/subs, both of them with the same variable name (with same type or diferent type, it does not matter), then change the Cation on one of the variables, and see what happens with the other in the ohter function...
For example
Code:
Private Sub Func1()
Dim TestVariable As String
End Sub
Private Sub Func2()
Dim TestVariable As Integer
End Sub
Just change "TestVariable" to "Testvariable", and see what happens
This hapened to me a lot, and it is quite anoying, especially when you include a module/class (that is not made by me) using same variable names as I do. It took me a long time to figure out why I cannot change the variable name, and it always jumps to some other caption state...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|