Basic structure of the Template scripting language

Template scripting language is divided into the following parts:

  1. Instructions to create text
  2. Instructions to retrieve data
  3. Instructions to manipulate data

To distinguish between text that has to appear in the result document and Template scripts, the hash symbol is used. Each time the hash symbol is encountered, KCM switches from instruction mode to text mode, or vice versa. A Master Template is started in the text mode, and you should place the hash symbol before the first Template script.

The following is an example of a simple Master Template.

# 
BEGIN 
# 
This is a very simple Master Template document. 
# 
END

BEGIN and END indicate the beginning and the end of the Template script sequence.

When switching from instruction mode to text mode, any whitespaces after the hash sign till and including the first paragraph sign are ignored.

Examples

Here is an example of the output with no spaces.

#BEGIN
#             #
END#

Here is an example of the output with spaces.

#BEGIN
#
                #
END

To clarify coding in a Master Template, you can add comments. Comments begin with (* and end with *).