---
url: /flow/guide/scripting-reference/functions/conversion/currstrtofloat.md
---

# FloCurrStrToFloat

## Declaration

`Function FloCurrStrToFloat( const S : string) : Extended`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
var MyAmount : String
begin
MyAmount := '$1,234.567';
Value := FloCurrStrToFloat(MyAmount); //Value will be equal to 1234.567
end;
```

## Description

FloCurrStrToFloat converts a string containing numeric and currency characters into a Float data type, by removing the non-numeric characters. If the remaining characters do not represent a valid numeric value an error will occur.

You could use a [Try...Except](/flow/guide/scripting-reference/statements/try...except) block to handle the error and provide a default value.

(This page corrected in November 2018 to include "Flo" at the beginning of the function name.)
