PasScript, Delphi and two questions

"Leos Urban" <Leos.Urban@iol.cz>
23 Jul 2001 02:32:32 -0400

          From comp.compilers

Related articles
PasScript, Delphi and two questions Leos.Urban@iol.cz (Leos Urban) (2001-07-23)
| List of all articles for this month |

From: "Leos Urban" <Leos.Urban@iol.cz>
Newsgroups: comp.compilers
Date: 23 Jul 2001 02:32:32 -0400
Organization: Internet OnLine
Keywords: Pascal, question
Posted-Date: 23 Jul 2001 02:32:32 EDT

Hello,
I tested PasScript (5.8) with Delphi (5Pro) and have two simple questions.


1) I want to use DB BLOb for storing scripts. But when I insert some script
(as Memo) into PasScript.Script property, Run method returns error. It looks
that script MUST be in existing file ???


2) When I call function (PasScript.CallFunction method) some error is
returned.
Is here some Delphi examples for using CallFunction or CallProcedures (Var
parameters)??


My function:
var p1,p2,p3: Variant;
begin
  PasScript1.ScriptFileName := 'example.pas';
  PasScript1.Parse;
  p1 := 5;
  p2 := 6;
  p3 := PasScript1.CallFunction('soucin',[p1,p2]);
  ShowMessage(p3);
end;


example.pas:
program aa;
function soucin(a,b:Integer):Integer;
begin
  soucin := a*b;
end;
begin
end.


Thanks
Leos


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.