// Converts a string to its integer equivalent function fVal(s: string): integer; function fVal(s: string): integer; var v, c: integer; begin Val(s, v, c); result := v; end;