Turn user input string into mathematical function

后端 未结 2 1219
情话喂你
情话喂你 2021-01-06 17:41

For the purposes of what I want to do I need to take a user input as a string and convert it into an unevaluated function. For example, if the user input was \"x^2*sin(x)\"

2条回答
  •  情歌与酒
    2021-01-06 18:17

    Essentially, you need to implement your own syntax parser and convert input string into an Expression Tree.

提交回复
热议问题