StrToFloatEx

Top  Previous  Next

Prototype

 

FloatOutput:= StrToFloatEx (strInput,strDec,strMig)

 

Description

 

Convert the string in a float number setting the decimal and thousands separator.

 

Parameters

 

strInput: string to convert.

 

strDec: string representing decimal separator

 

strMIg: string representing thousands separator

 

Returned Value

 

FloatOutput:Float number obtained from conversion

 

Notes

 

None.

 

Example

 

 

//It initializes variable to convert

Str:='0,20';

//It converts the data considering ',' as decimal separator and '.' as thousands separator

Ts:=STRTOFLOATEX(Str,',','.');

Test:=Ts*0.2;

//It logs test value

ApplicationLog(floattostr(test)); 

 

 

//It initializes variable to convert

Str:='0.20';

//It converts the data considering '.' as decimal separator and ',' as thousands separator

Ts:=STRTOFLOATEX(Str,'.',',');

Test:=Ts*0.2;

//It logs test value

ApplicationLog(floattostr(test));