function StrToIntDef(s: string; def: Longint): Longint;
The StrToInt function converts the string passed in S into a number. If S does not represent a valid number, StrToInt returns the number passed in Def.