[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'db' (#fcl)

# TFloatField

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class for floating point values

## Declaration

Source position: db.pas line 615

`type TFloatField = class(TNumericField)`
`protected`
`function GetAsFloat; override;`
`function GetAsLongint; override;`
`function GetAsVariant; override;`
`function GetAsString; override;`
`function GetDataSize; override;`
`procedure GetText(); override;`
`procedure SetAsFloat(); override;`
`procedure SetAsLongint(); override;`
`procedure SetAsString(); override;`
`procedure SetVarValue(); override;`
`public`
`constructor Create(); override;` |  | Create a new instance of the TFloatField
`function CheckRange();` |  | Check whether a value is in the allowed range of values for the field
`property Value: Double; [rw]` |  | Value of the field as a double type
`published`
`property Currency: Boolean; [rw]` |  | Is the field a currency field.
`property MaxValue: Double; [rw]` |  | Maximum value for the field
`property MinValue: Double; [rw]` |  | Minimum value for the field
`property Precision: LongInt; [rw]` |  | Precision (number of digits) of the field in text representations
`end;`

## Inheritance

`TFloatField` |  | Class for floating point values
`TNumericField` |  | Base class for all numerical data field classe
`TField` |  | Provide access to the contents of a single field in a record
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

## Description

TFloatField is the class created when a dataset must manage floating point values of double precision. It exposes a few new properties such as Currency, MaxValue, MinValue and overrides some TField methods to work with floating point data.

It should never be necessary to create an instance of TFloatField manually, a field of this class will be instantiated automatically for each floating-point field when a dataset is opened.

## See also

Currency |  | Is the field a currency field.
MaxValue |  | Maximum value for the field
MinValue |  | Minimum value for the field

The latest version of this document can be found at lazarus-ccr.sourceforge.net .