Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: >< swap operator Date: Tue, 02 Oct 2018 16:06:53 -0700 Organization: None to speak of Lines: 16 Message-ID: References: <36d546c5-b471-45fc-b87a-8ebebdc0c0b7@googlegroups.com> <730b028f-e601-4d8b-95ac-1e3c9a11ee89@googlegroups.com> <61b07dd1-2af0-4f82-8ab6-bd831b564c53@googlegroups.com> <8acd77a2-920b-477a-9902-29a555f14440@googlegroups.com> <7dcd73d2-4876-4a78-a1b5-940a0cce5120@googlegroups.com> <3YPsD.393167$tw.210351@fx11.am4> <54f174c8-9184-437a-9457-df9be71daf53@googlegroups.com> <52RsD.545684$ju.259221@fx18.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="ab641a093d6af250d7c951df9b0111e8"; logging-data="29750"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5zG7lbn3AHs/9ntoJc8ET" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:vIvlJY4KWXfkmpNBO/gKeqpUwdI= sha1:PPDwN61/a9olArky/85EGnvNtJ4= Xref: csiph.com comp.lang.c:136063 Bart writes: [...] > For the length of a string, use strlen. For the length of a string > constant, use: > > strlen("bart")-1; I think you meant sizeof("bart")-1 . [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"