<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 12/12/2019 15:34, Michael Van
Canneyt wrote:<br>
</div>
<blockquote type="cite"
cite="mid:alpine.DEB.2.21.1912121517150.26005@home">
On Thu, 12 Dec 2019, Martin Frb wrote:
<br>
<blockquote type="cite">That still would not break, but it
actually is the base for something that would break.
<br>
</blockquote>
<br>
The point was to demonstrate that array of const is 1 argument. It
is not equal to a variable number of arguments.
<br>
</blockquote>
Yes. <br>
Only if I read the other mails of this argument correctly (and it
may be the case I misunderstood something), then that point was
never disputed.<br>
The call was to "drop the [] if the open array is the last argument
in the list"<br>
And this was not, because the called method expects more than one
argument. The called message is still declared "array of ...". The
called message still accepts it as that single param.<br>
<br>
But the "drop []" call was made, because the compiler would be able
to determine (even without the []) that the remaining param would be
*one* single open-array param.<br>
<br>
So my interpretation of this request is, that the clarity of having
[], could be dropped for a perceived benefit of maybe less typing or
maybe easier-to-read-for-some.<br>
<br>
As for my personal view on this: Not in favour. <br>
But anyway I did not want to add my personal view. I thought that
potentially the argument was missing the point. If it was not, then
apologies for the noise.<br>
<br>
<blockquote type="cite"
cite="mid:alpine.DEB.2.21.1912121517150.26005@home">
<br>
<blockquote type="cite">It was already mentioned, that the [] can
be dropped if the array has *exactly one* element.
<br>
</blockquote>
Not sure what you mean here, but even if there is only 1 argument,
today the [] cannot be dropped:
<br>
</blockquote>
<br>
I referred to the following previous post in this conversation.
(very last line from Sven)<br>
>>>>>>>>><br>
<div class="moz-cite-prefix">On 10/12/2019 23:14, Sven Barth via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMUeB-v0Qh8_EZQPmnsCUibcnU1VypFH3P5Q5vm-CVseHJu3A@mail.gmail.com">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Ryan Joseph via fpc-devel
<<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>>
schrieb am Di., 10. Dez. 2019, 22:29:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">DoThis(firstParam,
[1,2,3]);<br>
doesn't really need the [] in this case since the last
parameters would have to be an array of const.<br>
</blockquote>
</div>
</div>
</div>
</blockquote>
....<br>
<blockquote type="cite"
cite="mid:CAFMUeB-v0Qh8_EZQPmnsCUibcnU1VypFH3P5Q5vm-CVseHJu3A@mail.gmail.com">
<div dir="auto">Fun fact: There is in fact one such case for open
arrays: a single element may be passed without the square
brackets. <br>
</div>
</blockquote>
<<<<<<<<<<br>
I may have misread it. And yes I took it from what I read and did
not test it. Having tested it now, it seems that you are right, and
brackets are needed too.<br>
I never tried it, because I never needed (nor wanted) it.<br>
<br>
</body>
</html>