<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Le 12/06/2023 à 19:05, Steve Litt via
fpc-pascal a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:20230612130530.12e3fd41@mydesk.domain.cxm">
<pre class="moz-quote-pre" wrap="">Busted! I used Pascal 1984-1993</pre>
</blockquote>
So I guess you are not familiar too with the "Result" variable which
appeared with Delphi 1 in 1995 if I remember correctly.<br>
<br>
<pre class="moz-quote-pre" wrap="">nextt:= num;
</pre>
can be written to as :<br>
<br>
<pre>Result:= num;
</pre>
<a moz-do-not-send="true"
href="https://www.freepascal.org/docs-html/ref/refse94.html"
class="moz-txt-link-freetext">https://www.freepascal.org/docs-html/ref/refse94.html</a><br>
<br>
I prefer Result because it reduces risks of confusion with recursive
call <br>
and you can eventually take the address of Result with @Result
(where @nextt would take the address of the function nextt), <br>
pass it by reference to another function ( e.g. <font
face="monospace">FillChar( Result, SizeOf(Result), 0);</font> ) ,
<br>
it behaves like a normal variable.<br>
</body>
</html>