Dear Hans, I found the problem.
I tested the code to give the different file name for each process, but there is no changes. Hence, it is not the problem of the file “tempList.lua” which contains the list “tfList”. It is the problem of the “tfList”. Since I put local tfList = {} before the "function document.truthTable(a, func)”, and save it to tempList.lua. That is, I appended the truth value to the pervious “tfList”! There was no initialization of the tfList ={} By moving “local tfList = {}” to inside the function, the outputs are correct. Thank you for your concern. Best regards, Dalyoung >> Is there a way to clear the contents in the tempList.lua before I save >> another table? > > so you add to that list? > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________