We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This code works fine in 32-bit mode, but in x64 the var2str_func function passes the parameter Unassigned. A rule parameter is passed to var2str
procedure TForm26.btn1Click(Sender: TObject); var PSS: TPSScript; begin PSS := TPSScript.Create(nil); try PSS.OnCompile := PSSCompile; PSS.Script.Text := 'begin var2str(12); var2str_func(13); end.'; if PSS.Compile then PSS.Execute; finally FreeAndNil(PSS); end; end;
function TForm26.var2str(AValue: Variant): string; begin Result := AValue; end;
function var2str_func(const AValue: Variant): string; begin Result := AValue; end;
procedure TForm26.PSSCompile(Sender: TPSScript); begin Sender.AddFunction(@var2str_func, 'function var2str_func(const AValue: Variant): string;'); Sender.AddMethod(Self, @TForm26.var2str, 'function var2str(AValue: Variant): string;'); end;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This code works fine in 32-bit mode, but in x64 the var2str_func function passes the parameter Unassigned.
A rule parameter is passed to var2str
procedure TForm26.btn1Click(Sender: TObject);
var
PSS: TPSScript;
begin
PSS := TPSScript.Create(nil);
try
PSS.OnCompile := PSSCompile;
PSS.Script.Text := 'begin var2str(12); var2str_func(13); end.';
if PSS.Compile then PSS.Execute;
finally
FreeAndNil(PSS);
end;
end;
function TForm26.var2str(AValue: Variant): string;
begin
Result := AValue;
end;
function var2str_func(const AValue: Variant): string;
begin
Result := AValue;
end;
procedure TForm26.PSSCompile(Sender: TPSScript);
begin
Sender.AddFunction(@var2str_func, 'function var2str_func(const AValue: Variant): string;');
Sender.AddMethod(Self, @TForm26.var2str, 'function var2str(AValue: Variant): string;');
end;
The text was updated successfully, but these errors were encountered: