({{, $RandomState
gives a representation of the internal state of the pseudorandom generator used by (RefLink[Random, paclet:ref/Random]). }})

OpenersNotesSection(Spacer1)Details

The value of $RandomState changes every time (RefLink[Random, paclet:ref/Random]) is called.

You can use s=$RandomState to explicitly save the value of $RandomState, and $RandomState=s to restore.

The value of $RandomState is always a long integer chosen from a certain large set of possibilities. You can assign $RandomState only to values in this set.

You can use (RefLink[Block, paclet:ref/Block])[{$RandomState},expr] to localize the value of $RandomState during the evaluation of expr.

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[SeedRandom, paclet:ref/SeedRandom])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Pseudorandom Numbers, paclet:tutorial/PseudorandomNumbers])}})}})