Skip to content

Flow documentation · legacy product

StrToInt ​

Declaration ​

Function StrToInt( const S : string) : Integer;

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
var MyAmount : String
begin
MyAmount := '123';
Value := StrToInt(MyAmount); //Value will be equal to 123
end;

Description ​

StrToInt converts a string into an integer data type. If string does not contain a integer value an error will occur.

You could use a Try...Except block or StrToIntDef to handle the error and provide a default value.