The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



IsValidDouble


Unit:SDL_math1
Class: none
Declaration: function IsValidDouble (Instring: string; AllowExp: boolean; DecSeparator: TDecPSep): boolean;

The function IsValidDouble checks whether the string Instring contains a valid floating point number. Valid characters are the digits '0'...'9', 'E', '.', ',', leading '-' and '+' signs, and leading blanks. If the parameter AllowExp is set TRUE the scanned number may be optionally represented in exponential notation. The DecSeparator parameter controls which character is used as a decimal separator. It may take one of the following values:

dsDot the "." character (dot)
dsComma the "," character (comma)
dsBoth allows both the dot and the comma character
dsSystem the decimal separator is taken from the system locale



Last Update: 2023-Feb-06