|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....|
|Home MathPack Math1 Conversion ScanFPNum|
|See also: strf, ScanHex, Decimal, ScanOctal, ScanBin, ScanStreamFPNum, IsValidDouble, IsValidFPNum|
The function ScanFPNum decodes a decimal floating point number from a string. The parameter Instring contains the decimal number to be scanned, starting at the position defined by the parameter Idx. 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 stored in exponential notation. The parameter DecPChar determines which character is accepted as decimal separator:
On return, ScanFPNum contains the corresponding floating point number, and the variable parameter Idx points to the first character after the scanned number. If the number constitutes the final part of the string, Idx points to 1+length(Instring ).