IF THISTHREAD = SUCKS THEN
MSGBOX("PENIS",VBYESNO,"MESSAGE")
ELSE
FOR NUMBER = 1 TO 10
NUMBER=1
NEXT
END IF
Name:
Anonymous2006-04-03 0:58
SUCKS is undefined
Name:
Anonymous2006-04-03 1:14 (sage)
This board keeps hitting new lows.
Name:
Anonymous2006-04-03 1:49
>>2
He doesn't have the line "OPTION EXPLICIT", so I think SUCKS will be implicitly declared as a Variant. I'm not sure what value it would be initialized to though.
Name:
Anonymous2006-04-03 3:39
If you were a real veebee "programmer" you'd know that the IDE won't let you type in all caps like that, because Microsoft doesn't trust you with capitalization. This mistrust is well founded. Here's what I get after copy-pastage: Dim THISTHREAD As String
Dim NUMBER As Integer
If THISTHREAD = SUCKS Then
MsgBox "PENIS", vbYesNo, "MESSAGE"
Else
For NUMBER = 1 To 10
NUMBER = 1
Next
End If
Note that I had to remove the parens from your MsgBox call, since it was flagged as invalid syntax because you're not using the return value for anything. Don't feel bad, I get caught out by this all the time; it's just another example of veebee's pointlessly retarded syntax rules.
I guess an uninitialised variant is considered to be an empty string when used in comparison against an actual string, because I got a nice MsgBox informing me about PENIS rather than the infinite loop you were kind enough to include in your code.
In conclusion, I fucking hate my job, please let me either die, or get a job programming in a language that doesn't suck worse than Java, or get a job as network admin in a girls' highschool.
Name:
Anonymous2006-04-03 6:24
I liked the old QuickBasic better when all keywords were uppercase.