Re: While loop style



Alternatively, you could use for :-

for(; queue.remove(); )
; // empty

--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com
http://blog.voidnish.com


"Charles Tam" <CharlesTam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DAF56A25-FB5B-4F8E-A347-D0BD2F60FCD2@xxxxxxxxxxxxxxxx
> I've a while loop as below, and would like to execute the true expression
> until false. Is my style of ";" correct?
>
> FYI: queue.remove() returns true if element is removed, false if queue is
> empty. Note, the queue do not provide a isEmpty funtion.
>
> ////////////
> while ( queue.remove() )
> {
> ;
> }
> ////////////
>


.



Relevant Pages

  • Re: Do I need a RTOS?
    ... Avail slots are by nature empty correct? ... in the avail queue, as I earlier defined them to be. ... head-pointers are equal to each other, the avail-queue is full and the ... decide to execute them is another issue. ...
    (comp.arch.embedded)
  • Re: Do I need a RTOS?
    ... place, everything is empty ... ... the queue and requesting that I always keep some task in the queue. ... It is there that I call the execute function, over and over, pumping ... timer event, of course. ...
    (comp.arch.embedded)
  • Re: Do I need a RTOS?
    ... place, everything is empty ... ... the queue and requesting that I always keep some task in the queue. ... It is there that I call the execute function, over and over, pumping ... with executeand call executeas your basic busy loop in main. ...
    (comp.arch.embedded)
  • Re: While loop style
    ... > I've a while loop as below, and would like to execute the true expression ... the queue do not provide a isEmpty funtion. ... An empty compound statement is legal syntax, so you can get rid of the ... statement (i.e. a bare semicolon): ...
    (microsoft.public.vc.language)
  • While loop style
    ... I've a while loop as below, and would like to execute the true expression ... the queue do not provide a isEmpty funtion. ...
    (microsoft.public.vc.language)

Quantcast