D4
D4: array[0..7] of Byte;
Example
procedure ReadLastByte(G: TGUID; var Value: Byte);
begin
Value := G.D4[7];
end;
Usage
D4 holds the final eight TGUID bytes, forming the fourth and fifth text groups and carrying UUID variant data.
Additional Technical Info
D4 is the fixed zero-based eight-byte tail of a TGUID. Valid indices are 0..7; each entry is an unsigned Byte.
In {00112233-4455-6677-8899-AABBCCDDEEFF}, D4[0]=$88, D4[1]=$99, and D4[2]..D4[7]=$AA,$BB,$CC,$DD,$EE,$FF. The first two bytes form the fourth text group and the remaining six form the fifth. Unlike D1-D3's native numeric fields, D4 is already stored in this displayed byte order.
For standards-conforming UUIDs, high bits of D4[0] encode the UUID variant. TGUID does not validate them. Mutating bytes can destroy version/variant semantics or uniqueness assumptions.
Check the index before dynamic access. Use GUID conversion/generation functions for complete values and protocol-specific routines for raw byte interchange.
The example is source-reviewed only; no array element was accessed at runtime.
External references
- Embarcadero TGUID - native D4 layout.
- RFC 9562 UUID format - version and variant bit layout.