Hi all, I encountered a problem when using the stdlib-function double strtod (const char *string, char *endp); --- char *End; float fValue = (float)strtod(String, &End); --- The conversion works fine but weird values are assigned to the char-Pointer "End" which should point to the first character that could not be converted. Using strtol or strtoul does not show this problem. Btw. the String used for testing of course is terminated. Anyone recognized this problem before ? I'm using uV ver3.00 with C166 ver5.00 Best Regards
End is a pointer; &End is the address of the pointer. Is that what you really want...?
mmh, I copied the prototype from the keil manual. Obviously there's another mistake. This is the prototype from stdlib.h double strtod (const signed char *str, signed char **ptr); And there's no other way to let a function return more than one value anyway. I don't think thats the problem.