StrToIntDef
From SCAR Divi Manual
Definition
function StrToIntDef(s: string; def: Integer): Integer;
Availability
SCAR Divi 3.00 > Current
Description
Converts a string s to an integer, if s is not an integer the function returns the value given by def.
Example
begin WriteLn(StrToIntDef('5', 5)); WriteLn(StrToIntDef('a', 5)); end.
Output:
5 5