On Sep 27, 7:46 pm, namekuseijin <namekusei...@gmail.com> wrote: > On 27 set, 05:46, TheFlyingDutchman <zzbba...@aol.com> wrote: > > Fact is: almost all user data from the external words comes into > programs as strings. No typesystem or compiler handles this fact all > that graceful...- Hide quoted text - > You're right. C should have a much better library than it does for parsing user-supplied string input.
The scanf() family of functions is fine for everyday use, but not robust enough for potentially hostile inputs. atoi() had to be replaced by strtol(), but there's a need for a higher-leve function built on strtol(). I wrote a generic commandline parser once, however it's almost impossible to achieve something that is both useable and 100% bulletproof. -- http://mail.python.org/mailman/listinfo/python-list