uses
JclExprEval;
procedure TForm1.FormCreate(Sender: TObject);
var
FEvaluator: TEvaluator;
begin
Memo1.Lines.Clear;
FEvaluator := TEvaluator.Create;
try
Memo1.Lines.Add(FloatToStr(FEvaluator.Evaluate('(3 + 5) * 10')));
finally
FEvaluator.Free;
end;
end;
{
80
}
沒有留言:
張貼留言