[NTG-context] randomize

Wolfgang Schuster schuster.wolfgang at googlemail.com
Tue Apr 6 00:49:13 CEST 2010


Am 06.04.10 00:21, schrieb Wolfgang Werners-Lucchini:
> 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?
>    
ConTeXt saves the random value in the tuc file to get the same output in 
each run.

Delete the tuc file with 'context --purgeall'.

Wolfgang



More information about the ntg-context mailing list