Quote:
Originally Posted by rdyornot
I've looked through it several times, read through it and tried various searches - it never specifies valid characters for separators. It also doesn't seem to have come up in the forums before.
|
The syntax of
Single Function Mode, which you are using, is extremely basic. There is no such thing as a string. Spaces are not ignored. Commas are sometimes ignored. As the documentation says:
Quote:
Important: If you have programming experience, please note that the syntax in Single Function Mode is not what you expect. Strings are not quoted and spaces are significant. All arguments are considered to be constants; there are no expressions.
|
You should use either
Template Program Mode or
General Program Mode. Both use a traditional syntax that separates strings from characters in the program. TPM's syntax is more constrained because it must live inside template snippets.
As for list separators, that is up to you. Any string can be used as a separator in the Template or General Program modes. Calibre uses both comma and ampersand, depending on the data. In some cases it uses a colon, for example in identifiers. You seem to want to split a space-separated phrase into words, which is possible in the more general modes but isn't something calibre does with its standard data types.