Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: Looping Choice

Reply
Thread Tools

Re: Looping Choice

 
 
Martin Ambuhl
Guest
Posts: n/a
 
      09-30-2008
Lorenzo Villari wrote:
> In
> http://fms.komkon.org/EMUL8/HOWTO.html
> I read:
> "After initial values are assigned, we start the main loop:


> for(;
> {


> Note that this loop can also be implemented as


> while(CPUIsRunning)
> {


> where CPUIsRunning is a boolean variable. This has certain advantages,
> as you can terminate the loop at any moment by setting CPUIsRunning=0.
> Unfortunately, checking this variable on every pass takes quite a lot of
> CPU time,


That is nonsense.

> and should be avoided if possible. Also, do not implement this
> loop as
>
> while(1)
> {
>
> because in this case, some compilers will generate code checking
> whether 1 is true or not. You certainly don't want the compiler to do
> this unnecessary work on every pass of a loop."


That is nonsense. It is even sillier than that which came before.

> I would like to read your opinions on these statements


Try using a reputable source in the future. The claims that you quoted
are complete bullshit.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
looping in array vs looping in a dic giuseppe.amatulli@gmail.com Python 5 09-20-2012 11:58 PM
Re: Looping Choice James Kuyper C Programming 7 10-03-2008 07:38 AM
c++ as choice for long term application choice. miles.jg C++ 16 11-14-2007 03:43 PM
Can Choice components respond to keyboard input like HTML Choice components? Mickey Segal Java 0 02-02-2004 10:59 PM
Choice of DHCP-server? Is the "IOS-one" a good choice? Fred Cisco 1 12-11-2003 06:25 AM



Advertisments