Fabulous Adventures In Coding
Eric Lippert is a principal developer on the C# compiler team. Learn more about Eric.
When you're getting close to shipping a beta for a big product, the dev team is either insanely busy tracking down last-minute issues, or deathly bored. This week was one of the insanely busy weeks! Lots of late nights. It looks like next week should be a little calmer though.
Anyway, on with the quiz answers.
2) Which of the following are
I actually gave the answer to this one already,
The range of a short integer is -32768 to 32767, so it should be clear why (a) and (b) are
Incredibly, (a), (c) and (d) agree with VB6. but
One reader asked if this meant that there were no negative literals in VBScript. Indeed, that is a reasonable interpretation. But in a later question we'll show that it's not quite that simple.
(Incidentally, VBScript and VB.NET both overflow into larger types, but they use different overflow resolution algorithms. That's a subject for another blog though.)