OffsetOf() Syntax error.

Just starting out? Need help? Post your questions and find answers here.
pjay
Enthusiast
Enthusiast
Posts: 251
Joined: Thu Mar 30, 2006 11:14 am

OffsetOf() Syntax error.

Post by pjay »

Hi all,

Not sure if this is a bug... Should OffsetOf() work with a nested structure without causing a syntax error?

I'm working around the error by summing the offset of the two structure elements I'm using, but I don't think it should be necessary.

Code: Select all

; Win x64 v6.21 beta 9
Structure sVec2f : x.f : y.f : EndStructure
Structure sBezier ; quadratic
  v1.sVec2f : v2.sVec2f : v3.sVec2f
EndStructure

Debug OffsetOf(sBezier\v2\y)

; workaround
Debug OffsetOf(sBezier\v2) + OffsetOf(sVec2f\y)

User avatar
mk-soft
Always Here
Always Here
Posts: 6242
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: OffsetOf() Syntax error.

Post by mk-soft »

Is not a bug, but a features request 8)
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
pjay
Enthusiast
Enthusiast
Posts: 251
Joined: Thu Mar 30, 2006 11:14 am

Re: OffsetOf() Syntax error.

Post by pjay »

Thanks for the input MK, i'll do that.
Post Reply