I wasn't exactly sure either. I'm attempting a port of some Delphi code to VB6 and well, from what it looks like, a word type is two bytes, flipped (assumed to have something to do with endians - no idea though) i.e. hex BD31 is 31BD and is converted to an integer. So Str(&H31BD) would return the integer I'm looking for.
The order is Intel based with the lower byte being first. On another computer like the 68000 based cpu, it is the other way around. The term "Word" (from assembly language) is the same as an Integer in VB. Be aware an integer in vb is considered to be either a plus or minus number by using the MSB (far left bit in binary) as a sign value rather than part of the number represented. When this is a problem (numbers greater than 32767), I normally convert the 2 byte "word" value to a Long which is 4 bytes. It wastes 2 bytes of memory but retains the origional Word value.
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe