const LANG_FRENCH = (SORT_DEFAULT shl 16) or ((SUBLANG_FRENCH shl 10) or LANG_FRENCH); var FmtSettings: TFormatSettings; F: Extended; begin GetLocaleFormatSettings(LANG_FRENCH, FmtSettings); F := StrToFloat('150,40', FmtSettings); end;
const LANG_ENGLISH_US = (SORT_DEFAULT shl 16) or ((SUBLANG_ENGLISH_US shl 10) or LANG_ENGLISH); var FmtSettings: TFormatSettings; F: Extended; begin GetLocaleFormatSettings(LANG_ENGLISH_US, FmtSettings); F := StrToFloat('150.40', FmtSettings); end;
[quote]strtofloat('150,40);/quote
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionvar FmtSettings: TFormatSettings; F: Extended; begin GetLocaleFormatSettings(LOCALE_USER_DEFAULT, FmtSettings); FmtSettings.DecimalSeparator := '.'; F := StrToFloat('150.40', FmtSettings); end;