Pascalscript and var parameters

edited 5:28PM in FastScript
Hi,

i am also evaluating the script engine. I want to call a pascal script from my delphi. The problem is, i only get the values i have set before calling the script function.

I have a script with the following source:
Procedure GetPoints ( Var Value1, Value2 : Integer );
Begin
Value1 := 234;
Value2 := 567;
End;

My Delphi Source looks like
Var Params : Variant;
begin
Params := VarArrayOf([1, 2]);
if fsScript1.Compile then
Begin
fsScript1.CallFunction( 'GetPoints', Params );
ShowMessage ( Params[0]);
ShowMessage ( Params[1]);
End Else
BEgin
ShowMessage ( fsScript1.ErrorMsg + ' ' + fsScript1.ErrorPos );
End;
end;


Comments

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.