Possibly infinite loop

Navigation:  Messages > Macro Compiler Messages > Warnings >

Possibly infinite loop

Previous pageReturn to chapter overviewNext page

This compiler warning is generated if a while loop is based on a condition which is always true.

 

var

begin  

  while true

 

  endwhile        

end              

 

In the above example it is clear that execution of the loop will never stop, unless you use a break instruction in the loop, as in the example below.

 

var

   bIsFinished

begin  

  while true

      // check something

       bIsFinished = true

      if bIsFinished

          break

      endif

  endwhile        

end                          

 

Otherwise this is a very rare warning, but one that should always be addressed.


Topic 109013 updated on 11-Apr-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?possiblyinfiniteloop.htm