发新话题
打印

请教

//edit1.text :=  '3 * (23 - (34/23 - 22)) + 33'
//uses comobj;
procedure TForm1.Button1Click(Sender: TObject);
var
vScript: Variant;
str:string;
begin
str:=edit1.text;
vScript:=CreateOleObject('ScriptControl');
vScript.Language := 'JavaScript';
str:=vScript.Eval(str);
showmessage(str);
end;

TOP

发新话题