RULE FILES

Top  Previous  Next

Rule files are text files that contain descriptions of form enhancements.  There can be any number of these enhancements, called rule sets, in a rule file.  A header line composed of a unique name enclosed in square brackets indicates a new rule set.  For example, an invoice form rule set would begin with the line [Invoice], followed by lines indicating enhancements to the invoice output sent by the application.  Without a rule set to work with, UnForm will not perform any enhancements.  UnForm determines which rule set to work with based on either a command line option (-r), or detect commands contained in the rule set.

 

The region in a rule file above the first rule set is known as the global area.  This area can contain global constants (defined with the const or global commands) that apply to all rule sets, and global merge commands, which are internally loaded at the top of all rule sets in the file.

 

The enhancements that follow the [form-name] line are made up of commands and (usually) a list of parameters separated by commas.  The available enhancements are described on the following pages.

 

Unless otherwise noted, all column and row specifications are 1-based (i.e. the first column is 1, rather than 0).

 

Commands that have parameters accept either a space or an equal sign between the keyword and the first parameter; page 66 and page=66 are equivalent.

 

If a command and its parameters require a large amount of text, it is possible to split a command across multiple lines by adding a backslash character at the end of a line to indicate the command continues on the next line.  You can have as many continuation lines as necessary.  UnForm removes leading spaces and tabs from continuation lines, so you can use indention to improve readability, as long as you remember to place any required spaces before the backslash on the initial line.  For example:

 

text 1,30,"This line of text is continued \

 on this line.",12,cgtimes

 

Note that the UnForm Design Tool puts continuation lines back together, so this feature is useful only when using a text editor for rule file development.

 

The driver differences and support for different keywords is noted.  Note, however, that when a command indicates all drivers, this doesn't necessarily indicate support by html.  For the HTML driver, please refer to the HTML chapter.