Skip to content

Default

Return Default initialized value

Declaration

Source position: system.fpd line 92

  function Default(const T: AnyType) : AnyType;

Description

Default is a compiler intrinsic: it returns for every type T a default value. In essence, this is a block of memory that is zeroed out. It can be used to correctly initialize any type, and more importantly, a managed type. It also works using a generic type template.

This function cannot be used on any of the file types or complex types that contain a file type.

See also

Name Description
Finalize Finalize (clean up) memory block using RTTI
Initialize Initialize memory block using RTTI
TypeInfo Return pointer to type information for type