Conceptual error in the script engine
Due to the incorrect implementation of caching of parameters in functions exported in FastScript, the further use of these functions is potentially dangerous because obtaining unpredictable results.
For example, we declare two functions in the script.
First function:
We get the result: 'True True' instead of the expected 'True False'.
For example, we declare two functions in the script.
First function:
function Test1(aValue : boolean = false) : string;
begin
  result := iif(aValue, 'True', 'False');                                   Â
end;
The second function is the twin of the first:
function Test2(aValue : boolean = false) : string;
begin
  result := iif(aValue, 'True', 'False');                                   Â
end;
Then call them:
  ShowMessage(Test1(True) + ' ' + Test2(False));
We get the result: 'True True' instead of the expected 'True False'.
Comments
And I think it's better to open a ticket than to write in this forum.
Thanks for the remark, I corrected the code in the original message.