Command/getrandomnumber

From Wiki
< Command
Revision as of 08:16, 31 March 2014 by Thangalin (talk | contribs)
Jump to navigation Jump to search

Overview

The \getrandomnumber command provides a mechanism to create a macro initialized to a random value.

Example

The following example sets the macro n to contain a randomly selected number between 1 and 10.

\starttext
  \getrandomnumber \n {1} {10}
  \n
\stoptext