Is there an analogue in the delphi function eval which can consider, for example, (2+6)*7+55/6 ?

    1 answer 1

    In the standard delivery - no. With the help of additional components - yes. For example, using TEvaluator from the JEDI Code Library .

     var evaluator : TEvaluator; value : TFloat; begin evaluator := TEvaluator.Create; try value := evaluator.Evaluate(expression); finally evaluator.Free; end; end; 
    • and there is a root - mbv
    • I think yes. Like the Sqrt function. - Nicolas Chabanovsky
    • and if for example 4 + 6 + sqrt (7) * 78 - mbv
    • then he just doesn’t do anything - mbv