Reference Guides » Undocumented Contexts
System*
The "System`*`"
contexts provide similar functionality to the "Internal`*`"
context in terms of low-level usage.
There are a huge number of these contexts, so we'll just focus on a few of them.
SystemPrivate
SetNoEntry
This is a special function that tags an expression as being treated as atomic (i.e. it cannot be "entered" by Part
)
See here
NoEntryQ
This tests whether an expression has had SetNoEntry
called on it
EntryQ
Opposite of NoEntryQ
HoldSetNoEntry
SetNoEntry
but with held argument
HoldEntryQ
EntryQ
but with held argument
ConstructNoEntry
Constructs an atomic object, rather than having this set after the fact
Arguments
Collects the arguments to an expression and checks that the number of them is within an expected range. It holds its first argument.
- Single Number
System`Private`Arguments[test[1, 2, 3], 3]
{{1,2,3},{}}
- Variable Number
System`Private`Arguments[test[1, 2], {2, 3}]
{{1,2},{}}
- Different
Head
System`Private`Arguments[test[1, 2, 3], 3, Hold]
{Hold[1,2,3],Hold[]}
- With
Options
Options[test]={"Option1"->1, "Option2"->2};
System`Private`Arguments[test[1, 2, 3, "Option1"->2], 3, Hold]
{Hold[1,2,3],Hold["Option1"->2]}
- Bad option
Options[test]={"Option1"->1, "Option2"->2};
System`Private`Arguments[test[1, 2, 3, "Option"->2], 3, Hold]
{}
- Incorrect Number
System`Private`Arguments[test[1, 2, 3], 5]
{}
ArgumentsWithRules
Like Arguments
but reports that it expects to have options if too many non-option arguments are passed:
System`Private`ArgumentsWithRules[test[1, 2, 3, 4, "Option1"->4], 3]
{}
SystemUtilities
These tend to be a bit more developer oriented than many of the "System`Private`"
functions and a bit higher-level.
SymbolList
Extracts the list of symbols in an expression. Doesn't hold its argument.
- All symbols
System`Utilities`SymbolList[a[b[c[d]]]]
{d,b,a,c}
- Wrapped in a
Head
System`Utilities`SymbolList[a[b[c[d]]], Hold]
{Hold[d],Hold[b],Hold[a],Hold[c]}
- Ignored contexts
System`Utilities`SymbolList[Hold@Print@Hold@Print@a[b[c[d]]], Hold, {"System`"}]
{Hold[d],Hold[b],Hold[a],Hold[c]}
HashTable
Makes a new HashTable
object. Less useful since version 10 with the introduction of Association
.
See here
HashTableAdd
HashTableGet
HashTableRemove
Bits of the HashTable
API