[NTG-context] randomize

Wolfgang Werners-Lucchini wwl at musensturm.de
Tue Apr 6 00:21:52 CEST 2010


Hallo,

I get allways (10 times at least) the same result:
-------------------------------------------------------------
\starttext
\startluacode
math.randomseed(os.time())
\stopluacode

Encode your Name and Surname as a
\startluacode
local a = {'null-terminated', 'dollar-terminated', 'Pascal'}
context('%s string', a[math.random(1,3)])
\stopluacode
\stoptext
-------------------------------------------------------------
How can I randomize this?

Wolfgang


More information about the ntg-context mailing list