можно и так
Код:
uses comobj;
function eval(command: string): string;
var
script: Variant;
begin
script := CreateOLEObject('ScriptControl');
try
script.Language := 'VBScript';
//script.Language := 'JScript';
//script.Timeout:=-1;
//script.AllowUI:=True;
result := script.eval(command);
finally
script := Unassigned;
end;
end;
caption := eval('2*2');
__________________
>woweook<
|