Dear Lukáš, On Mon, Apr 13, 2015 at 02:26:38PM +0200, Procházka Lukáš Ing. - Pontex s. r. o. wrote: > Hello Kumar, > > could you provide a (non-working) minimal example? > > I tried this: > > ---- > local C = context > > local n = 0 > > C.starttext() > > C("A") > n = n + 1 > C("B") > n = n + 1 > C("C") > n = n + 1 > > print("***", n) > > C.stoptext() > > print(">>>", n) > ---- > > and I got "3" (twice) - what I expected:
Thanks for the response. I am looking at something like this: ============== \starttext \directlua{total = 0} \title{Homework 1} Total score: \directlua{tex.print(total);} Question 1 (3 points) \directlua{total = total + 3} Question 2 (4 points) \directlua{total = total + 4} Question 3 (5 points) \directlua{total = total + 5} \stoptext ============== I expect the “Total score” to be followed by “12”, but I don't know how to get that (or whether that is even possible). Thanks. Kumar -- Kumar Appaiah ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________