Because
seekEoln[
^] returns true if it is at the end of a line. Which it won't be the first time you enter the loop in your
sth
procedure, but will be immediately after calling readln...
And please, do yourself a favor: learn to indent your code so it is at least partly readable? It'll make your life a lot easier in the future, as well as our now... :sigh: