On Wed, 23 Sep 2020 08:28:20 -0700, Ralf Quint via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:
>Similar like moving code blocks around in >Python with a one-off indentation and all the sudden the flow of that >code changes, without complaining... This use of whitespace as block delimiter is why I never could cope with Python when I was working (now retired). Begin-end are really big helpers to correctly structure loops etc and I use them all the time to make things clearer. Also putting begin right below if, for, while etc makes it much easier in Lazarus to see what happens in multi-level code when one is selecting begin or end since they match vertically. So I never do: if something then begin some multi-line code here end; Instead: if something then begin some multi-line code here end; And of course as has already been pointed out the original question's example code fundamentally changes execution with or without the begin-end pair! -- Bo Berglund Developer in Sweden _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal