<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">El 26/08/2021 a las 10:00, Ondrej
Pokorny via fpc-pascal escribió:<br>
</div>
<blockquote type="cite"
cite="mid:ea72a95a-ec67-f9f4-c49b-5500600cc60f@kluug.net">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">On 26.08.2021 09:40, Santiago A. via
fpc-pascal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:f910f2a5-5ec2-8397-9de6-afe8be22af4d@ciberpiula.net">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<pre>const
DefaultDelta:extended = 1E-8;</pre>
<pre>function F(const x:extended; const delta:extended=DefaultDelta):extended;</pre>
<pre>function G(const x:extended; const delta:extended=DefaultDelta):extended;
</pre>
But I get "Illegal expression" in the header function
declaration. <br>
Const parameters don't accept const expressions?</blockquote>
<p>You need:</p>
<p>const<br>
DefaultDelta = 1E-8;<br>
</p>
</blockquote>
<br>
Thanks, it works fine.<br>
<br>
But I can't see why specifying the type doesn't work;<br>
<br>
<blockquote type="cite"
cite="mid:ea72a95a-ec67-f9f4-c49b-5500600cc60f@kluug.net">
<p> <br>
function F(const x:extended; const
delta:extended=DefaultDelta):extended;<br>
</p>
<p>Ondrej<br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Saludos
Santi</pre>
</body>
</html>