## 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
 SystemPrivateArguments[test[1, 2, 3], 3]

 {{1,2,3},{}}

• Variable Number
 SystemPrivateArguments[test[1, 2], {2, 3}]

 {{1,2},{}}

• Different Head
 SystemPrivateArguments[test[1, 2, 3], 3, Hold]

 {Hold[1,2,3],Hold[]}

• With Options
 Options[test]={"Option1"->1, "Option2"->2};
SystemPrivateArguments[test[1, 2, 3, "Option1"->2], 3, Hold]

 {Hold[1,2,3],Hold["Option1"->2]}

 Options[test]={"Option1"->1, "Option2"->2};
SystemPrivateArguments[test[1, 2, 3, "Option"->2], 3, Hold]

test::optx: Unknown option "Option" in test[1,2,3,"Option"->2].
 {}

• Incorrect Number
 SystemPrivateArguments[test[1, 2, 3], 5]

test::argrx: test called with 3 arguments; 5 arguments are expected.
 {}


### ArgumentsWithRules

Like Arguments but reports that it expects to have options if too many non-option arguments are passed:

 SystemPrivateArgumentsWithRules[test[1, 2, 3, 4, "Option1"->4], 3]

test::nonopt: Options expected (instead of 4) beyond position 3 in test[1,2,3,4,"Option1"->4]. An option must be a rule or a list of rules.
 {}


## SystemUtilities

These tend to be a bit more developer oriented than many of the "SystemPrivate" functions and a bit higher-level.

### SymbolList

Extracts the list of symbols in an expression. Doesn't hold its argument.

• All symbols
 SystemUtilitiesSymbolList[a[b[c[d]]]]

 {d,b,a,c}

• Wrapped in a Head
 SystemUtilitiesSymbolList[a[b[c[d]]], Hold]

 {Hold[d],Hold[b],Hold[a],Hold[c]}

• Ignored contexts
 SystemUtilitiesSymbolList[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

Bits of the HashTable` API