CAPL Script

Atodbl

Syntax

double atodbl(char s[]);

Function

The function converts the string s into a double number. Normally, the base is decimal and must have the following format: [Blank space] [Sign] [Digits] [.Digits] [ {d | D | e | E}[Sign]Digits] String parsing ceases at the first non-compliant character. If the string cannot be converted into a number, 0.0 is returned. If the string starts with 0x, the base used is 16. Only integer numbers can be read in.

Parameters

Input string to be converted.

Return Values

Double number, the converted string.

double d;d = atodbl("  -3.7");    // -3.7d = atodbl("0x1F");      // 31.0d = atodbl("1.3E2");     // 130.0

atol | strtod