Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integer & Int

Status
Not open for further replies.

HolierThanThou

Programmer
Jul 16, 2005
1
US
What is the functional difference between Integer & Int-32, Int-16, etc?
 
They are all signed and each one has a storage limit. Int-16 has 16 bits, b0, b1,...,b15. So we may say that:
int-16<int-32<int-64

I think that integer = int-16

If you need to store unsigned values... put a "u" at hte front: uint-16<uint-32<uint-64
 
A detailed breakdown of all the datatypes is available in both VS and MSDN help.
 
actually I think that integer depends on your OS and is 32 in a 32 bit system.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Sorry, Chrissie, but Integer is compiler/language dependent.

In .NET it is 32 bits, but in VB6 for example (also targetting 32 bits Windows, its only 16 bits - long is 32 bits, whearas in .NET long is 64 bits)

 
You are probably right, I'm sorry to say.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
If you need to call across the various .net languages (C#, VB.NET, COBOL.NET, etc) you'll want to use the Int16, Int32, Int64 versions to ensure compatability.

But otherwise, VB.NET's Integer datatype is just an alias for the Int32 structure from the System namespace.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top