Code: Select all
Structure TestStruc
a.l
b.w
c.b
EndStructure
test.TestStruc
Debug SizeOf(TestStruc)
Debug SizeOf(test)
TestStruc.POINT
Debug SizeOf(TestStruc)
structure TestStruc and not of the Variable TestStruc.POINT.
In C for example, you use something like these to distinguish between the
name of a structure and the name of a variable:
sizeOf (struct TestStruc) ; returns the size of the structure
sizeOf (TestStruc) ; returns the size of the variable TestStruc (.point)
So, it would be cool if there would be a syntax like the following suggested
by MVXA:
Allowing sizeOf with no parameter guarantees compatibility tosizeof(TestStruc)
sizeof(TestStruc, #PB_Variable)
sizeof(TestStruc, #PB_Structure)
sizeof(TestStruc, #PB_Interface)
old code.