> string a = "a";
string b = "b";
string c = "c";
string d = "d";
a = b = c = d;
Believe it or not, a similar piece of code was published on msdn. I
can't imagine why anyone would ever want to program like this. It looks
horrendous.
I don't think it's *that* bad, it just sets c to d, then b to c and then a
to b, so they all end up d.
Now here's some VB junk someone else did that I'm having to maintain right
now (this is the text change event for a textbox containing the number of
labels to print - one thing I'm having to do right now is change it so some
labels print from one printer and some get printed several weeks later on
another printer)....
Private Sub txtnol_Change()
On Error GoTo errhandler
Dim X, Z
Dim StrTmp, StrTMP2 As String
Z = 0
If Abs(txtnol) <> 1 Then
If Left(cbclsl, 1) = "C" Then
StrTmp = UCase(Right(Left(cbclsl, 11), 2))
Z = 1
ElseIf Left(cbclsl, 1) = "L" Then
StrTmp = UCase(Right(Left(cbclsl, 13), 2))
Z = 1
End If
End If
If Z = 1 Then
For X = 12 To 17
StrTMP2 = UCase(Right(Left(cbclsl.List(X), 9), 2))
If StrTmp = StrTMP2 Then
cbclsl = cbclsl.List(X)
Exit For
End If
Next
End If
If Abs(txtnol) > 50 Then txtnol = 50
Exit Sub
errhandler:
MessageBox "ACCESS DENIED!!!!"
End
End Sub
What's worse is the guy who wrote that claims to have an MCSD....