OffsetOf() should work on all structures.

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
pjay
Enthusiast
Enthusiast
Posts: 252
Joined: Thu Mar 30, 2006 11:14 am

OffsetOf() should work on all structures.

Post by pjay »

Currently OffsetOf() only works on flat structures, please extend to work with all defined structures, thanks. (or adjust the documentation to specify flat structures only?)

Code: Select all

Structure sPerson
  Name.s
  ForeName.s 
  Age.w 
  Statistics.point ; width / height (cm)
EndStructure

Debug OffsetOf(sPerson\Statistics\x)