[ale] C question

Ed Cashin ecashin at noserose.net
Thu May 22 18:40:11 EDT 2014


I'm not at a keyboard now, but strtol could do it all if you provide a
non-NULL end pointer. (That will make sense on reading the strtol man
page.) Just subtract the end from the start and compare to 5,after
specifying base ten.
On May 22, 2014 6:17 PM, "Robert L. Harris" <robert.l.harris at gmail.com>
wrote:

>
> Anyone have a very simple C program source that given a command of :
>
> ./Validate XXXXX
>
>
> it will verify that XXXXX is a 5 digit integer and then execute
>
> system( "/bin/touch XXXXX");
>
>
>
> There's much more to it but I'm hung up on this.  Unfortunately I'm not a
> C person.
>
> Robert
>
>
> --
> :wq!
> ---------------------------------------------------------------------------
> Robert L. Harris
>
> DISCLAIMER:
>       These are MY OPINIONS             With Dreams To Be A King,
>        ALONE.  I speak for                      First One Should Be A Man
>        no-one else.                                     - Manowar
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20140522/b54b47d2/attachment.html>


More information about the Ale mailing list