Quantcast
Channel: Why doesn't this use of Begin[] work? - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by Mr.Wizard for Why doesn't this use of Begin[] work?

Just for reference:(Begin["cc`"]; Evaluate[Symbol["x"]] = 1; End[])cc`x1

View Article



Answer by Leonid Shifrin for Why doesn't this use of Begin[] work?

For your second question, I refer you to this answer of mine, which effectively automates the steps you outlined (with the ParseTimeNameSpaceWrapper function). It may need more work to make it more...

View Article

Answer by Brett Champion for Why doesn't this use of Begin[] work?

Symbols (and their contexts) are created when parsing, not evaluation. If we use $NewSymbol we can see this in effect:$NewSymbol=Print["Name: ",#1," Context:...

View Article

Why doesn't this use of Begin[] work?

If we evaluate these lines one-by-one, x will be created in the context cc.Begin["cc`"];x = 1;End[]However, if we evaluate them together,(Begin["cc`"];x = 1;End[])then x will be created in Global. This...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images