Skip to content

Instantly share code, notes, and snippets.

@XProger
Last active August 29, 2015 14:01
Show Gist options
  • Save XProger/89c360fedcd1da8b3978 to your computer and use it in GitHub Desktop.
Save XProger/89c360fedcd1da8b3978 to your computer and use it in GitHub Desktop.
Delphi simple calculator
function Calc(const CalcStr: string): string;
var
v : Variant;
begin
v := CreateOleObject('MSScriptControl.ScriptControl');
v.Language := 'JScript';
Result := v.Eval(CalcStr);
v := Unassigned;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment