You can determine the amount of storage required for a variable of a User-Defined Type using the LEN function. To determine the requirements for a student record, for example, use:
RecordSize = LEN(Student)
The address of a record variable, as returned by the VARPTR function, is the address in memory of the first byte of data in the record. You can also obtain the starting address of the fields within the record by passing the full name of the field (Student.IdNum, for example) to the VARPTR function.
A single UDT structure is limited to 16 MB (16,777,216 bytes). Locally dimensioned UDT structures are limited to the amount of free stack space available, typically less than 1 MB. If larger UDT structures are required, use a STATIC or GLOBAL declaration instead (since these are not stored on the stack). The same rules apply to Unions (and LOCAL fixed-length and nul-terminated strings).
Note that the
User-Defined Types (UDTs)