Please enable JavaScript to view this site.

 

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 // should be endfor !
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, last updated on 18-Apr-2020