Question about SizeOf()

Everything else that doesn't fall into one of the other PB categories.
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Question about SizeOf()

Post by Flype »

Hello,
Is the value of SizeOf( MyStruct ) precalculated at compilation ?
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Fred
Administrator
Administrator
Posts: 18349
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Yes.
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

thanx Fred,

On the french forum, Denis confirmed me this through this piece of code :

Code: Select all

PB CODE:
a = SizeOf(BITMAPINFOHEADER) 
End  

ASM OUTPUT CODE:
; a = SizeOf(BITMAPINFOHEADER) 
MOV eax,40 
MOV dword [v_a],eax 
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Post Reply