שאלה

eyal the one

New member
שאלה

int תמיד מיוצג כגודל מילה של מערכת ההפעלה, יש סיבה לזה?
 

Edo Reshef

New member
optimizations

Int is defining by the application target. This means that if you compile 16bit application Int becomes 16bit, same for 32,64 (soon to come) this helps the compiler to create more optimized code. Another interesting thing about int is the compiler optimizations applied to it. Int and Long are both 32bit types but the compiler tends to create more optimized code for the Int type then the Long one. I have seen this happens in Delphi, and heard it exists in VC++. I don't know about .NET. I also think that .NET is 64bit ready and that must have some implications about the Int size in .NET applications. But I might be wrong about it… If someone have VC++ compiler please do a quick check about how the assembler looks for the int and long types Have fun Edo​
 
למעלה