MrSwiss wrote:The Const (even if used as qualifier only) is responsible, that the memberscan't be changed, however, this is "expected behaviour" and not a bug.

no thats not what the const there means... it just mean the value of the ptr is constant which IS, meaning the pointer value is pre-calculated at compiled at compile time... which is what it suppose to do there (its not a ptr to a const...)

MrSwiss wrote:Assembly can access the ptr (but can't change the members it points to),if we are talking about FB's inline ASM. (Const makes it: "read only")

it's a ptr... the ptr is pointing to some, i would not be changing the ptr, but what it points to... (and thats fine)and on inlined asm accessing [tA] works but again... [tA.a] does not :), which obviously can be calculated a compile time when its a global...

@tA.A is not ptr access to member is address of the member of the struct i.e. @(tA.A) not (@tA).A ... so to get a constant (meaning its obtained at COMPILE TIME) that is the address to the member of the global UDT

extern pAddrOfB alias "pAddrOfB" as any ptr '<- see combining with the asm one it worksprint hex$(pAddrOfB,8)print hex$(@tTest.B,8)sleep

anyway its not that i need the ASM i was just saying that from ASM i can sorta workaround that, without the runtime overheadfor something that should have worked (altough may not the CONST... but at least initialize the address member, since ASM can do thatand accepting tTest.A on the asm block would be an improvement of the inlined asm integration... since thats freebasic ignoring the variable because of the . )

true all that work but they are NOT constants and incurr runtime overhead that is not necessary... specially when the value is suppose to be avaliable at compile time as my combination of ASM and EXTERN showed....