>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
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
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
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
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
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
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
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
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
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,
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
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
12 matches
Mail list logo