Missing endfor

Navigation:  Messages > Macro Compiler Messages > Errors >

Missing endfor

Previous pageReturn to chapter overviewNext page

This compiler error will occur if the compiler does not find a matching endfor for each for of for loops. Common examples are :

 

var

   nTemp

begin

  for nTemp = 1 to 50 step 1

 

end

 

or even :

 

var

   nTemp

begin

  for nTemp = 1 to 50 step 1

 

  endwhile

end

 

The first case can be prevented by always writing block instructions in pairs, before fleshing out the inside (ie. write the if-else-endif first before writing any other code). The second case often occurs if you convert a while loop into a for loop.


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