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

# BinToInt

## Declaration

`Function BinToInt( v : String) : LongInt;`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
Value := BinToInt(BinaryField.Value);
end;
```

## Description

BinToInt converts a String representing a binary value into Integer data type.

This is used when you need to read into Binary type fields within a database or file.
