x
x
x


Do so in a way which:

 does not involve string manipulation of the input source code
 is plausibly extensible to a runtime-chosen set of bindings rather than just x
 does not make x a global variable


or note that these are impossible.



See also

 For more general examples and language-specific details, see Eval.
 Dynamic variable names is a similar task.


      expression$ = "x^2 - 7"
      one = FN_eval_with_x(expression$, 1.2)
      two = FN_eval_with_x(expression$, 3.4)
      PRINT two - one
      END
 
      DEF FN_eval_with_x(expr$, x)
      = EVAL(expr$)