Dear all,
I save a table “tfList” using table.save in Lua:
\startluacode
...
table.save(“tempList.lua”,tfList)
...
\stopluacode
And I call it in MetaFun using a method explained in the MetaFun book.
\startMPcode
lua("MP = { } MP.data = table.load('tempList.lua')") ;
…
\stopMPcode
However, I found that whenever I save “tfList”, table contents are appended to
the file “tempList.lua” at the end which cause a trouble.
I want the tempList.lua contains the new table only.
I search the method to do that, but I can’t find it.
The only way is to change the file name each time which is not good to make a
macro.
Is there a way to clear the contents in the tempList.lua before I save another
table?
Thank you for reading.
Best regards,
Dalyoung
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________