Navigation:  ThinBASIC Language > Data types and variables > TYPE (ord UDT User Defined Types) > UDT (User Defined Types) >

Memory representation

Previous pageReturn to chapter overviewNext page

 

Memory representation

 

This chapter covers advanced technical topic. Continue reading, if you plan to:

1.manipulate UDT variables via pointers
2.pass UDT variables to 3rd party DLLs

 

Otherwise feel free to continue to the next chapter.

 

The order in which are members declared is also reflected in the binary representation of the variable in memory.

 

Let's demonstrate it on our exemplar UDT:

 

TYPE Point2D

  x AS SINGLE

  y AS SINGLE

END TYPE

 

In this case, the element x is placed in memory first, and element y afterwards.

 

Continue reading to explore how to determine size, element offsets and sizes in memory.