Creating struct/UDTs – best practices
When creating a struct or UDT, it is always best to think of the structure of the data. Remembering that other programmers need to easily pick up and use the data is the best way to ensure it is structured efficiently.
Understanding what is required
Choosing which type of structure is best for the application that is being built is fundamentally down to how it will be used.
Anonymous structures (structs) are best for grouping variables or other structures together, but not for use in interfaces.
The reason for this is that structs are not linked to each other. If 10 FBs make use of the same struct layout in interfaces and a new requirement is added to the struct, all 10 FBs require editing. UDTs are instantiated as a data type, so if a UDT is updated, all instances of the UDT update too. This is what makes UDTs more suited for creating standard code.
Defining structure variables
Before creating a structure, define exactly...