Top "Eval" questions

eval is a function that allows a programmer to execute arbitrary code written in the same language, from a string variable within a code.

Is there C/C++ equivalent of eval("function(arg1, arg2)")?

it need a way to call function whose name is stored in a string similar to eval. Can you help?

c++ eval
How to mathematically evaluate a string like "2-1" to produce "1"?

I was just wondering if PHP has a function that can take a string like 2-1 and produce the arithmetic …

php math numbers operators eval
Bash problem with eval, variables and quotes

I've been reading about quotes in bash here and everywhere else, but i got no help solving this problem. The …

bash eval rsync quoting
Eval() = Unexpected token : error

I tried this simple JavaScript code: eval('{"Topics":["toto","tata","titi"]}') In the Chrome console, for example, this …

javascript json eval
How to evaluate formula passed as string in PHP?

Just trying to figure out the proper and safer way to execute mathematical operation passed as string. In my scenario …

php string parsing math eval
Indirect variable assignment in bash

Seems that the recommended way of doing indirect variable setting in bash is to use eval: var=x; val=foo …

bash eval variable-assignment quotes
eval in if statement?

<% if(Eval("SaveDate") != DBNull.Value){ %> do magic <%} %> gives me error: Databinding methods such as Eval(), XPath(), …

c# asp.net eval
When is `eval` in Ruby justified?

"Is 'eval' supposed to be nasty?" inspired this one: Mostly everybody agrees that eval is bad, and in most cases …

ruby eval
Python: make eval safe

I want an easy way to do a "calculator API" in Python. Right now I don't care much about the …

python eval
<%# Eval("State") %> or <%# DataBinder.Eval(Container.DataItem, "state")%>

What is the difference between having <%# Eval("State") %> in your aspx page, versus having <%# DataBinder.Eval(Container.…

asp.net data-binding eval