Wanted
2007-06-10 16:57:03
function StrToFloatDef(s: string; def: extended): extended;
begin
try
Result := StrToFloat(s);
except
Result := def;
end;
end;
function StrToBoolDef(s: string; def: boolean): boolean;
begin
try
Result := StrToBool(s);
except
Result := def;
end;
end;Edit: Also anything that is a string conversion should have a default… there's a lot more in ArrayLoader.scar in SRL