[fpc-pascal] basic question on begin, end;

Sven Barth pascaldragon at googlemail.com
Wed Sep 23 21:34:06 CEST 2020


Am 22.09.2020 um 14:46 schrieb dano none via fpc-pascal:
>              end;
>              my_base := my_base + 15;
>              writeln('current base ',my_base:2);
>              ch := ReadKey;
>      {  end;  { end i = column indexer }}
The bottom three statements will only be executed as part of the first 
for-loop if you use “begin … end”, otherwise they'll only be executed 
*after* the loop and only once.

Regards,
Sven


More information about the fpc-pascal mailing list