<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>(sorry for the pm, Paul, should have gone to list)<br>
</p>
<div class="moz-cite-prefix">Op 2/20/2019 om 3:32 PM schreef Paul
van Helden:<br>
</div>
<blockquote type="cite"
cite="mid:CAPjGFZfWdOtAZc676de5jRfv=4TKiAytugLz_UrDMpTSUvSMew@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">On Wed, Feb 20, 2019 at 3:52 PM Sven Barth via
fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">Pascal is a language where declaration and
use of variables is separated. It makes it easy to see
what variables are declared and what type they are.
Inline variables mess this up as a variable can be
declared somewhere inside the code. </div>
</div>
</blockquote>
<div><br>
</div>
<div>Now I'm curious. Can you point me to a resource where
Pascal is defined such that the separation of declaration
from use is a central tenet? I'm not sure, but I doubt I
ever look at the variable declarations to help understand
the rest of the code...</div>
</div>
</div>
</blockquote>
<p>I'm not really a Pascal semantics guy, but I'll give it a try:<br>
</p>
<p>Pascal is block oriented. At the end of a block is always the
opener of a new block (var, type, procedure, begin), encountering
these tokens in the wrong are typically a warning that something
is wrong.Now what is that marker at the end of an inline variable
block ? Afaik there is none. The next can be any statement in any
form, and you must disambiguate yourself if a variable declaration
is meant or not.</p>
<p>From what I can see Embacadero avoids this by keeping all its
examples one line, with the VAR on the same line. But Pascal is
not line oriented, so this is also odd. <br>
</p>
<p>And keep in mind contrary to C/C++, Pascal is a limited lookahead
parser.</p>
<p>So the whole feature reeks of Embacadero's desperation to keep
bullet lists for new versions filled to keep people upgrading.</p>
<p>It has nothing to do with language design or better C/C++ syntax
(*) or whatever. It is just a quick implementation in the hope to
score some points with people that have participated in similar
threads in Embarcadero groups. They just did a most minimal
quick-and-dirty implementation and tossed on the feature matrix.
Please upgrade.<br>
</p>
<p><br>
</p>
(*) it is strange that people complain about scrolling 1000 lines up
to see a declaration, but can effortlessly scan those 1000 lines for
possible inline declarations without scrolling up.
</body>
</html>