Fabulous Adventures In Coding : VBScriptThe VBScript languageVBScript Quiz Answers, Parts Nine and Ten- March 30, 2005 9) Which of these statements is syntactically legal Why (a) Const Z = -+-+-+-10(b) Const Y = 2 + 2(c) Const X = .1e310(d) Dim W(+10) (a) is legal. The rest are illegal. (a) is legal because you can put as many unary positive or negative operators on top of a constant as you want, so long as it's a numeric constant. (b) is illegal; as I've discussed before, we do not support "constant folding" in VBScript. (c) is illegal because it's outside the range of a float. (d) is illegal because,...http://blogs.msdn.com/ericlippert/archive/2005/03/30/vbscript-quiz-answers-parts-nine-and-... VBScript Quiz Answers, Part Eight- March 23, 2005 8) Which of these programs is syntactically legal (a)Class Bar Function Foo End Function Function Foo End FunctionEnd Class (b) Class Bar If Blah Then Function Foo End Function Else Function Foo End Function End IfEnd Class (c)If Blah Then Function Foo End FunctionElse Function Foo End FunctionEnd If (d)Select Case Blah Function Foo End...http://blogs.msdn.com/ericlippert/archive/2005/03/23/vbscript-quiz-answers-part-eight.aspx VBScript Quiz Answers, Part Seven- March 21, 2005 Before I get into today's entry, a brief editorial comment: Pestilence is a frickin' pain in the rear. Famine was no problem at all, Rodney didn't touch me once, and Master Kaen fell to my powerful fists, but two Amulets of Life Saving, one Wand of Death and four potions of full healing were insufficient to keep Pestilence at bay. That's the second time Pestilence has ruined a perfectly good ascension. I need to figure out how to take that guy out. (If you have no idea what I'm talking...http://blogs.msdn.com/ericlippert/archive/2005/03/21/vbscript-quiz-answers-part-seven.aspx |