Int32 vs Integer - difference

Denaes

Senior Contributor
Joined
Jun 10, 2003
Messages
956
Ok, if this isn't VB Syntax specific I'll eat my trackball!

I know 32bit variables will run better on a 32bit machine.

int16 is there for programming on 16bit machines and same with int64, for the 64bit OS's (one of the new windows OS?).

I think I've seen that Integer is now 32bit. Int32 is 32 bit. Is there any difference between the two?

I'm thinking (my own logic here) that the Int(Number) variables are ment to be the standard used variables, so the programmer has full control and Integer is a legacy bit from VB6.

Am I right? Are there any differences? Is one faster than the other or provide any different functionality?
 
Int16, Int32 and Int64 can store different minimum and maximum numbers. Integer is equivalent to Int32, same with Short for Int16 and Long for Int64.
 
This could be more of an issue as the .Net framework is available for 64 bit platforms. I fyou just want an integer that works well on the currently running platform then Integer would be a good choice as it will be Int32 on a 32 bit platform and Int64 on a 64 bit platform.
If the size of the variable matters (memory usage, interop with other systems, binary files etc) then picking Int16, Int32 or Int64 (or the aliases as mutant mentioned) would be more appropriate.
 
Back
Top