Deutsch English Français Italiano |
<87v7wfrx26.fsf@doppelsaurus.mobileactivedefense.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat <rweikusat@talktalk.net> Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Command Languages Versus Programming Languages Date: Fri, 22 Nov 2024 17:35:29 +0000 Lines: 31 Message-ID: <87v7wfrx26.fsf@doppelsaurus.mobileactivedefense.com> References: <uu54la$3su5b$6@dont-email.me> <vhq11q$nq7$1@reader2.panix.com> <877c8vtgx6.fsf@doppelsaurus.mobileactivedefense.com> <87zflrs1ti.fsf@doppelsaurus.mobileactivedefense.com> <vhqed2$c71$2@reader2.panix.com> Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net P9e1qs6w9Yd9RbHSWz8NUAkxhn8fsv7f/4sXNsweia24JjxbU= Cancel-Lock: sha1:uMyXjHzIe9ePdISeRVexBDKlsr8= sha1:ovfgefFPHIcuD6sm0yYExG40mkI= sha256:s9QyuRg5Z7b0ASxV2UeYtWek/oGh+JPiPL9SZUNHNH0= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Bytes: 1836 cross@spitfire.i.gajendra.net (Dan Cross) writes: > In article <87zflrs1ti.fsf@doppelsaurus.mobileactivedefense.com>, > Rainer Weikusat <rweikusat@talktalk.net> wrote: >>Rainer Weikusat <rweikusat@talktalk.net> writes: >> >>[...] >> >> >>> Something which would match [0-9]+ in its first argument (if any) would >>> be: >>> >>> #include "string.h" >>> #include "stdlib.h" >>> >>> int main(int argc, char **argv) >>> { >>> char *p; >>> unsigned c; >>> >>> p = argv[1]; >>> if (!p) exit(1); >>> while (c = *p, c && c - '0' > 10) ++p; >> >>This needs to be >> >>while (c = *p, c && c - '0' > 9) ++p > > No, that's still wrong. Try actually running it. If you know something that's wrong with that, why not write it instead of utilizing the claim for pointless (and wrong) snide remarks?