juh+ntg-cont...@mailbox.org schrieb am 08.10.2024 um 20:10:
Am 08.10.24 um 19:16 schrieb Wolfgang Schuster:
You can change the separator when you create a custom splitter.
local csvsplitter = utilities.parsers.rfc4180splitter{ separator = ";" }
Thanks a lot.
Just curious. I often wonder in pure ConTeXt when to use curly bracets
and when square brackets
In this lua code I would think we would need simple rounded ones.
Like in your first example where you call the splitter without options:
local csvsplitter = utilities.parsers.rfc4180splitter()
I am sure that this is some lua convention, but, nevertheless, it
puzzles me.
It's explained in the Lua manual:
%%%% begin quotation
Lua 5.4 Reference manual
[...]
3.4.10 -- Function calls
[...]
A call of the form f{fields} is syntactic sugar for f({fields}); that
is, the argument list is a single new table.
[...]
%%%% end quotation
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________