I'm trying to write an overloaded function that can return data as different types. Basically the function I will altimately be calling will return a string, hoever I want to write a wrapper around this so that I can get results in other types (Integer, real, etc..)
Heres my example.. When I try to compile this, I get "Ambiguous overloaded call to 'DBGetValue'.. What am I doing wrong here?
function DBGetValue(Module,Key:String):String; overload;
Result := '12345';
function DBGetValue(Module,Key:String; const Default:Integer = 0): Integer; overload;
s := DBGetValue(Module,Key);
Result := StrToInt(s);
Result := Default;