Awesome!
-
Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)
-
Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)
I can't figure out which one is most atrocious.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-
I can't figure out which one is most atrocious.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-
Well, given that they are both VB6...
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-
I can't figure out which one is most atrocious.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
I agree that they are both pretty bad. It's the curse of having to dive into some vb6 code on occasion...
-
Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)
The second lends itself to replacing the values with a file string and thus more flexible strFileValue = "summer;winter;spring;fall;late fall;early spring;late birthday" 'comes from a configuration file or user settings, or whatever. dim strArray as string strArray = split(strFileValues, ";")
-
Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)
There's a third... Which I just dealt with today in an old Excel VBA macro (Essentially VB6)... (Hastily-written, VB-style pseudo-code, as it's faster than removing the proprietary stuff)
For x = 1 to 13
Dim line As String
line = GetLine(x, username, code, thing, item, anotherstring, andanother, blah, blah, blah, blah, blah)(Do something with line...)
Next x
...
Public Function GetLine(x As Long, username As String, etc etc etc etc etc)
Select Case x
Case 0
GetLine = "SomeString="&username
Case 1
GetLine = "Something Else=" & code
Case 2
GetLine = "Another Thing=" & thing
...
Case 13
GetLine = "Some literal string"
End Select
End FunctionYes, it passes all those parameters to the function 13 times. Yes, it only uses one of those parameters each time. Yes, every member of that select statement is a simple concatenation of a literal with a string parameter (If even that). Yes, I replaced the whole system with a C# utility as fast as I could.
-
Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)
VB6 is dead – I hope. Too may surprise VB.Net is pretty good.
INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
-
Well, given that they are both VB6...
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon