JCL Help:StrToFloatSafe@string

From Project JEDI Wiki
Jump to navigationJump to search


Summary

The function StrToFloatSafe attempts to convert the string passed as a parameter to its float value.


Pascal

 function StrToFloatSafe(const S: string): Float;


Parameters

Parameters Description
const S: string String to be converted to float value.


Return Value

Returns the float value of the string S passed as a parameter. If error occurs, the function returns 0.00.


Description

The function StrToFloatSafe attempts to convert the string passed as a parameter to its float value. It handles correctly decimal and float separators as well as negative sign. Function also handles national settings for thousand separator (see ThousandSeparator variable).


About

Unit

JclStrings


Donator

Azret Botash


Contributors

Robert Rossmair


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page