jamie,
sash,
winni,
lucamar,
all your points are well taken. And that leaves me ever more perplexed!
1) I have attached the source of this little project whose sole purpose is to test and check stuff and things (button "Choose Year"). Sorry for the non conventional use of lower/upper case in identifiers, I come from FORTRAN and Pascal in the 70s and then Turbo Pascal. Also included are two screenshot cutouts to show the anomaly and the modest objective.
2) The code compiled on Debian 9 will show the anomaly on the same O.S. and also on Tails 4.3 and Debian 10 Live.
3) Could it be that something went wrong during the installation of Lazarus/Pascal or Debian? If so, how could I check it without reinstalling everything?