Date: Tue, 20 Oct 2009 05:42:41 +0200 From: Polytropon <freebsd@edvax.de> To: Patrick Mahan <mahan@mahan.org> Cc: Gary Kline <kline@thought.org>, FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: need C help, passing char buffer[] by-value.... Message-ID: <20091020054241.ce4a38fe.freebsd@edvax.de> In-Reply-To: <4ADCAB4F.5040707@mahan.org> References: <20091019013337.GA9522@thought.org> <4ADBFDBA.6040702@pchotshots.com> <20091019170634.GA12371@thought.org> <4ADCAB4F.5040707@mahan.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Just a little and quite formal side note: On Mon, 19 Oct 2009 11:09:19 -0700, Patrick Mahan <mahan@mahan.org> wrote: > while (*tp != '\0' && *tp++ != '<'); It's often a good choice, especially for increasing readability of code, to code the "empty statement" on a line on its own (as you usually put any statements on an own line for clarity), so the reader doesn't accidentally take it as and "end of command" notification, e. g. while(1) ; instead of while(1); which could be confused with the syntactical meaning of whatsthis(1); I'm just mentioning this because I saw this in a programming project when I was at university. A young programmer who was given the task to look at code a very skilled programmer gave him. Somewhere in the code, an endless loop caused the program not to work properly. The student could not find this endless loop because it was coded in the manner as given above. It was not the polite form of for(;;); :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091020054241.ce4a38fe.freebsd>