uses ComObj;
procedure TForm1.Button1Click(Sender: TObject);
function ExpressCalc(exp: string): real;
var co: Variant;
begin
Co := CreateOleObject('ScriptControl');
co.Language := 'VBScript';
Result := co.Eval(exp);
end;
begin
Edit1.Text:=Format('%f',[ExpressCalc(Edit1.Text)]);
end;