Mirsad Todorovac wrote:
Please don't hate me - while writting mirsad08.pas I came to this problem: line 14 with Boolean expression fails to compile (or I don't know Pascal syntax well enough). I reduced the example to the minimum at which problem still appears.
Changing ... AND (i<start OR i>endr) AND ... to ... AND ((i<start) OR (i<endr)) AND ... made it compile.
You are a victim of C-think. Pascal precedence is very simple: multiplication, addition, comparison. are the fundamental groups. When in doubt, parenthize. The results also read better.