New answers tagged scoping
0
votes
Dataset column names not showing and entire dataset renders in closed form
Find set the assoc had errors. Here ia the solution.
...
9
votes
Accepted
Garbage collection for lexical closures
Here's an approach to "automate" the usage of the ExpressionCleanup` paclet mentioned by @LeonidShifrin. The idea is to return an object from your module ...
10
votes
Garbage collection for lexical closures
If you can afford this from performance standpoint, you can generate definitions at every function call:
...
1
vote
Trouble understanding the local variables of the Block command
For the last problem, you could convert it to boxes inside Block:
...
2
votes
Trouble understanding the local variables of the Block command
(cross-posted: https://community.wolfram.com/groups/-/m/t/2547643)
You say you "want x to always be a symbol", but all symbols will be replaced with their assigned values (OwnValues) if they ...
2
votes
Trouble understanding the local variables of the Block command
Example 1:
ClearAll["Global`*"]; Block[{x}, x] Block[{x}, Print[x]]
Output:
Explanation:
Block[{x}, x] returns x. Block[{x}, Print[x]] prints x and ...
3
votes
Trouble understanding the local variables of the Block command
Your question about Print arises because it evaluates to Null in the global name space.
...
2
votes
Counting multiple $-sign string indices in output and replacing them by normal indices
It is standard in xTensor work (and in all of xAct, actually) to set at the beginning of the session
$PrePrint = ScreenDollarIndices;
In this way the results will ...
Top 50 recent answers are included
Related Tags
scoping × 521function-construction × 63
dynamic × 49
manipulate × 47
functions × 44
evaluation × 43
variable-definitions × 35
programming × 33
plotting × 24
packages × 20
replacement × 18
core-language × 18
compile × 17
bugs × 16
differential-equations × 15
assignment × 15
contexts × 15
performance-tuning × 13
pattern-matching × 13
variable × 13
pure-function × 13
table × 11
memory × 11
hold × 11
equation-solving × 10