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

2020-09-27 Thread James Richters via fpc-pascal
>This is how a program looks after automated indentation: >https://github.com/StanfordPascal/Pascal/blob/master/PASCAL1.pas Automating the formatting is a great idea, your formatted code is exactly the way I would do it. I especially like the comments for the Begins and Ends so you can see what

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

2020-09-26 Thread Bernd Oppolzer via fpc-pascal
Am 25.09.2020 um 22:16 schrieb James Richters via fpc-pascal: I think that’s a GREAT quote from Niklaus Wirth, and I agree with that whole heartedly… programs should be readable by humans… otherwise do all your programming in assembly language… the whole POINT of a hi level language is to

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

2020-09-26 Thread James Richters via fpc-pascal
at others if I need to. James From: fpc-pascal On Behalf Of Markus Greim via fpc-pascal Sent: Thursday, September 24, 2020 4:12 AM To: bo.bergl...@gmail.com; fpc-pascal@lists.freepascal.org Cc: Markus Greim Subject: Re: [fpc-pascal] basic question on begin, end; Bo, "Programs

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

2020-09-25 Thread Markus Greim via fpc-pascal
Bo, "Programs must not be regarded as code for computers, but as literature for humans" Niklaus Wirth, the inventor of PASCAL. Last sentence on the last slide of his presentation. given at a conference to honor of his 80th birthday at the ETH Zürich in 2014. (i had the honor to

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

2020-09-24 Thread Jean SUZINEAU via fpc-pascal
Personnally I go even further ;-) if something then begin some multi-line code here end else begin some multi-line code here end; ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

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

2020-09-24 Thread Bo Berglund via fpc-pascal
On Wed, 23 Sep 2020 08:28:20 -0700, Ralf Quint via fpc-pascal 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

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

2020-09-23 Thread Sven Barth via fpc-pascal
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

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

2020-09-23 Thread Ralf Quint via fpc-pascal
On 9/22/2020 5:46 AM, dano none via fpc-pascal wrote: I have a basic shuffle routine. I put being, end statements in the outer loop for clarification. It ended up producing random results. Commenting out the begin, end combination allows the code to run as expected. My code is below, can

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

2020-09-23 Thread Christo Crause via fpc-pascal
On Wed, Sep 23, 2020 at 4:25 PM dano none via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > end; > my_base := my_base + 15; > writeln('current base ',my_base:2); > ch := ReadKey; > { end; { end i = column indexer }} > A different way

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

2020-09-23 Thread Tomas Hajny via fpc-pascal
On 2020-09-22 14:46, dano none via fpc-pascal wrote: Hello, I have a basic shuffle routine. I put being, end statements in the outer loop for clarification. It ended up producing random results. Commenting out the begin, end combination allows the code to run as expected. My code is below,

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

2020-09-23 Thread Bart via fpc-pascal
On Wed, Sep 23, 2020 at 4:25 PM dano none via fpc-pascal wrote: for i := start to stop do for j := start2 to stop 2 do CompoundStatement if functionally the same as for i := start to stop do begin for j := start2 to stop 2 do CompoundStatement end; A Compound Statement is a statement that

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

2020-09-23 Thread dano none via fpc-pascal
I have a basic shuffle routine. I put being, end statements in the outer loop for clarification. It ended up producing random results. Commenting out the begin, end combination allows the code to run as expected. My code is below, can someone tell me if the begin, end combination should