|
Returns the visual separator string for decimals. This return value is configured in module System>Settings>Company Date and Numeric Format. |
global
function val StringToValue(string vstr,Integer typ,string tho,string dec)
begin
val res;
Integer i;
string 255 lvstr,tstr;
string 1 nc;
if (blank(vstr)) then begin goto LStringToValue; end;
lvstr = vstr;
for (i=0;i<len(lvstr);i=i+1) begin
nc = Mid(lvstr,i,1);
if (nc==tho) then begin PutChar(lvstr,i,ThousandSeparator); end;
if (nc==dec) then begin PutChar(lvstr,i,DecimalSeparator); end;
end;
res = StringToVal(lvstr,typ);
LStringToValue:;
StringToValue = res;
return;
end;
««