= Example =
The following example sets the macro <textcode tt>n</tt> to contain a randomly selected number between 1 and 10. <texcode source="yes">\ctxlua{math.randomseed( os.time() )}
\starttext
\getrandomnumber \n {31} {510}
\n
\stoptext
</textcodetexcode> The first line of the code initializes the random number generator.