You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In VSoft.CommandLine.OptionDef.pas, under tkFloat: in TOptionDefinition<T>.Invoke, StrToFloat is called, but StrToFloat is locale specific.
This means that on most European machines, StrToFloat will assume ',' as a decimal separator and not '.'. That might not work well for scripts that use a program using this command line parser.
Now, I cannot find a simple method like Str (which for the reverse case always uses '.' as decimal separator, whereas FloatToStr would always use the locale), so you need to supply a TFormatSettings with DecimalSeparator set to '.' as its second argument.
The text was updated successfully, but these errors were encountered:
In
VSoft.CommandLine.OptionDef.pas
, undertkFloat:
inTOptionDefinition<T>.Invoke
,StrToFloat
is called, butStrToFloat
is locale specific.This means that on most European machines,
StrToFloat
will assume ',' as a decimal separator and not '.'. That might not work well for scripts that use a program using this command line parser.Now, I cannot find a simple method like
Str
(which for the reverse case always uses '.' as decimal separator, whereasFloatToStr
would always use the locale), so you need to supply aTFormatSettings
withDecimalSeparator
set to '.' as its second argument.The text was updated successfully, but these errors were encountered: