Skip to content

Flow documentation · legacy product

Field.AsFloat ​

Declaration ​

property AsFloat: double

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
begin
  Value := Dataset['myfield'].AsFloat; //the value of myfield is returned as a Float
end;

Description ​

Returns the value of the Field object as a Float (Double, Extended, Currency). If the field is null then zero will be returned.

It is recommended that you use this property when referencing Float type fields. This will help you avoid issues with null values causing arithmetic operators and numeric functions to fail.

If you need to convert an Float type field to a string you can safely use the Field.AsString property. Alternatively use a Conversion or Formatting function and this AsFloat property.