Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.setup,comp.os.linux.advocacy,sci.physics Subject: Re: I think in FORTH & program in C/C++. Date: Sun, 3 Oct 2021 11:49:38 -0600 Lines: 26 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net adRGby18nL39e19i3BzMyAhzaNSkzHPLPdR4TDI/I4etw/J1GH Cancel-Lock: sha1:rLbdAXDtSa3uAhkjcRTTqnOqe9U= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 In-Reply-To: Xref: csiph.com comp.os.linux.setup:4683 comp.os.linux.advocacy:595186 sci.physics:833607 On 10/02/2021 11:12 PM, Clutterfreak wrote: > > There's not a repetition that a do/while or a while loop can perform > that cannot be performed by a for loop as efficiently and as clearly. > I've not, in my life, used any loop that had a "while" in it in any of > the few languages that I programmed with. I only see the word "while" in > programming books and hear it others mentioning it. So it is not needed. > It is just another alternator doing what alternators do. for (; test; ) { .... test = pigsFly(); } static int pigsFly(void) { return 0; } Congratulations! You've created a while loop assuming test is true at the onset. When you only have a hammer... Sooner or later it comes down to JZ get_me_out_of_here