Skip to content

Struct datatype

Include: Built in; no package required.

Struct values are DataFlex non-scalar heap/reference values declared with Struct and End_Struct.

Size

Pointer-sized runtime reference storage; struct payload layout follows its metadata.

Range

A struct contains the fields declared in its metadata.

Example

Current packages define HTTP header values with metadata attributes:

Struct tHttpHeader
    { Name="Key" }
    String sKey
    { Name="Value" }
    String sValue
End_Struct

Structs can also contain nested struct and array fields, as in current package value-tree definitions.

Notes

Structs are one of the runtime non-scalar types and may contain scalar fields, struct fields, and array fields.