EAGLE Help Light

strtod()

Funkce
Converts a string to a real value.

Zápis
real strtod(string s);

Returns
The strtod function returns the numerical representation of the given string as a real value. Conversion ends at the first character that does not fit into the format of a real constant. If an error occurs during conversion of the string 0.0 will be returned.

Viz také strtol

Příklad


string s = "3.1415";
real r = strtod(s);
printf("The value is %f\n", r);


OBSAH Translation © 2001 ELCAD v.o.s., Copyright © 2001 CadSoft Computer GmbH