On Thu, Jun 13, 2002 at 02:13:48PM +1000, Martin Towell wrote: > But what about the pointer &cp2 > > If endptr is not NULL, strtol() stores the address of the first > invalid character in *endptr.
In you example endptr is always NULL! > If there were no digits at all, > strtol() stores the original value of nptr in *endptr. (Thus, > if *nptr is not `\0' but **endptr is `\0' on return, the entire > string is valid.) Check if the returncode is false, then use $format instead. > Instead of a pointer - a position number would be okay.... > > (Actually, to get the number, I could just do "$cp-0" or "$cp*1" - gotta > love variants) >From your example I got the impression you are only interested in multiplier.... -- Daniel Tryba -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php