The first readln
ends the while
loop. Note that you can enter many '.' without loop exit. Further note the writeln(a)
is delayed until you press <Enter>
. The second readln
allows you to view the output.
Make a test: Uncomment both readln
and see if you can end the program by entering a '.'.