137 views

### Localised variable shows up as Global [duplicate]

Why does this local variable show up as Global? ?q Information::notfound: Symbol q not found. >> ...
88 views

### Why does AtomQ[y] define y? [duplicate]

Mathematica Version 11.2 desktop / Windows 10 Pro 64-bit ...
88 views

### Local function becomes global after Plot [duplicate]

In the code below, I define and plot a local function f. Clear[f] Module[{f}, f[x_] := 1; Plot[f[x], {x, 0, 1}]] However, ...
34 views

### Symbol created in unevaluated second argument of If [duplicate]

Apologies for the long question title, but I couldn't come up with something shorter to describe the following. Starting with a clean session, there are no symbols in, let's say, ...
16k views

### What are the use cases for different scoping constructs?

Mathematica includes three functions that I know of which can be used to effectively (if not actually) define a variable and give it a value within a local scope: ...
1k views

### Create an adaptive amount of local variables for error propagation

I intend to write a function which calculates the result and the error for any formula with any amount of variables using the Gauß Error Propagation. The error $\mathrm{d}R$ for a function $A(a,b,c)$ ...
1k views

### Variable scope similar to other languages

Mathematica, unlike many other languages, defines the variables in the global scope unless it is explicitly asked to define a variable in a local scope, e.g., using ...
446 views

### Why does leaving and re-entering a context lose values defined in that context?

I'm getting unexpected behavior when beginning a new context, leaving it, and then re-entering it. Specifically, when re-entering the context, symbols that had been previously defined in that context ...
620 views

### Is it possible to use Begin and End inside a Manipulate?

May be someone can explain why I can't use Begin["context`"] and End[] inside a Manipulate ...
1k views

### How to unprotect a variable in a package

In Mathematica 9, I had the function(s). I apologize for the weak formatting. ...
529 views

### Scope within Context

To define some package-wide functions/variables, what approach is recommended? I tried to use contexts with the Begin function, but this failed: ...
796 views

### Context of localised (dynamic) symbols

When you localise a symbol with Module, the created unique symbol is usually in the current context. There seems to be an exception to this which has further ...
312 views

### Why does the global variable exist here, where it was declared only in Module?

Why does Mathematica choose the mechanism that makes the global variable a here while parsing? In ...