Programming Languages
C
Subjective
Mar 15, 2013
There are two types of eval statements i.e. eval EXPR and eval BLOCK. Explain them.
Detailed Explanation
When Eval is called with EXPR, the contents of the expression will be parsed and interpreted every time the Eval function is called.
With Eval BLOCK, the contents are parsed and compiled along with the rest of
the script, but the actual execution only takes place when the eval statement is reached. Because the code is parsed at the time of compilation of the rest of the script, the BLOCK form cannot be used to check for syntax errors in a piece of dynamically generated code.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts