Changes

Jump to navigation Jump to search
m
no edit summary
= Example =
The following example produces sets the macro <tt>n</tt> to contain a random randomly selected number between 1 and 10.
<texcode source="yes">
\ctxlua{math.randomseed( os.time() )}
 
\starttext
\getrandomnumber \n {1} {10}
\stoptext
</texcode>
 
The first line of the code initializes the random number generator.
419

edits

Navigation menu