This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Size
In order to determine the size of UDT in memory, alway use dedicated functions.
SizeOf will tell you how much memory is occupied by UDT. You can use it both with UDT or UDT variable:
msgBox SizeOf(Point2D)
DIM point AS Point2D
msgBox SizeOf(point)
Both of these will return 8 in this case, because UDT has two single precision members, each occupying 4 bytes.
How can you get this detailed information for members? Use SizeOf directly on them:
msgBox strFormat$("Size of .x is: {1} bytes, .y {2} bytes",
SizeOf(point.x),
SizeOf(point.y))
Please note the dynamic STRING always occupies 4 bytes, because it is internally represented via pointer.