<HTML>
<div><style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>Hi everyone,</div><div><br>
</div><div>So I'm making progress with my pure function implementation, or something passing as an early alpha prototype. I do have a question though... when the "firstpass" routines are called, have all the procedures been compiled into nodes yet? I'm still trying to work out the best time to evaluate function purity, partly due to constructs such as this:<br>
<br>
interface<br>
<br>
function PureFunc1(Input: Integer): Boolean;<br>
function PureFunc2(Input: Integer): Boolean;<br>
<br>
implementation<br>
<br>
function PureFunc1(Input: Integer): Boolean; pure;<br>
begin<br>
Result := PureFunc2(Input * Input); { "pure" directive for PureFunc2 hasn't been seen yet }<br>
end;<br>
<br>
function PureFunc2(Input: Integer): Boolean; pure;<br>
begin</div><div> { Do something complicated but deterministic! }<br>
end;<br>
<br>
****<br>
<br>
I could probably find the answer after some long research, but I'm trying to avoid wasting time unnecessarily. I would guess that the evaluation should occur at a similar time to when inline functions are expanded, where they are fully-defined and known to be inlinable.<br>
<br>
Gareth aka. Kit<br>
</div> </HTML>