* maadhuu:
definitely not Homework......atleast someone tell me what dynamic scoping
is and how it is implemented.
You don't have that in straight C++.
See <url:
http://en.wikipedia.org/wiki/Scope_%28programming%29#Static_versus_dynamic_scop ing>,
but skimming that explanation I found it hard to follow (even though I know
something about the subject matter), so perhaps pick up a good Lisp or
Scheme book?
Most Lisp books I've seen explain dynamic scoping more clearly than
Wikipedia currently does.
Short of it: when a function refers to an identifier A the reference is
bound to some variable or something depending on where in the call chain an
A was most recently defined, and the call chain is a runtime thing.
Dynamic scoping is of interest in C++ when functional-style programming is
added e.g. in the form of libraries like <url:
http://spirit.sourceforge.net/distrib/spirit_1_7_0/libs/spirit/phoenix/index.html>.
However I don't know whether Phoenix supports dynamic scoping.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?