Mark fields and span punctuation
Any span can be punctuated by adding the keyword
Punctuation
to the Business Rule followed by double quoted text which contains the punctuation symbols.Punctuation {Mark} fields can be placed anywhere within the span and will be replaced by one of the punctuation symbols.
Punctuation symbols
There are 4 punctuation symbols referred to as the first and following symbol, the penultimate symbol, the last symbol and the symbol for two members only. If there are fewer than 4 punctuation symbols in the double-quoted format text then the missing symbols are inferred.
Format Text | First and Following Symbol | Penultimate Symbol | Last Symbol | Symbol for Two Members |
|---|---|---|---|---|
", |, and |.| and " | ", " | ", and " | "." | " and " |
", |, and |." | ", " | ", and " | "." | "" |
", |; and " | ", " | "; and " | "" | "" |
", " | "," | "" | "" | "" |
"" | "" | "" | "" | "" |
In addition, certain escaped characters (not case sensitive) in the punctuation symbol are interpreted as MS Word controls:
Escaped Character | MS Word Control |
|---|---|
^T | tab |
^L | paragraph (Return) or manual line-break (Shift-Return) |
^M | manual page-break |
^N | manual column-break |
^| | vertical bar character |
^^ | hat character (^) |
Punctuation algorithm
The punctuation algorithm depends upon the number of {Mark} fields that remain after the contents of the span have been evaluated.
Number of Marks | Punctuation |
|---|---|
0 | No punctuation |
1 | The only {Mark} is replaced by the last symbol |
2 | The first {Mark} is replaced by the penultimate symbol and the second {Mark} is replaced by the last symbol |
3+ | The last {Mark} is replaced by the last symbol, the last-but-one {Mark} is replaced by the penultimate symbol and all other {Mark}s are replaced by the first and following symbol |
Example 1
In this example there are several termination clauses, some of which are compulsory (C and D) and some of which are optional (A, B, E and F). Note that each termination clause, whether compulsory or optional, has its own {Mark} to indicate where the punctuation symbol is inserted.
[
Punctuation " ;| ; and|."
[
TCA
Termination Clause A{Mark}][
TCB
Termination Clause B{Mark}]Termination Clause C{Mark}
Termination Clause D{Mark}
[
TCE
Termination Clause E{Mark}][
TCF
Termination Clause F{Mark}]]If TCA=false, TCB=false, TCE=false and TCF=false then the evaluated span will be:
Termination Clause C {Mark}
Termination Clause D {Mark}
and the punctuated clauses will be:
Termination Clause C ; and
Termination Clause D.
If TCA=true, TCB=true, TCE=true and TCF=true then the evaluated span will be:
Termination Clause A {Mark}
Termination Clause B {Mark}
Termination Clause C {Mark}
Termination Clause D {Mark}
Termination Clause E{Mark}
Termination Clause F {Mark}
and the punctuated clauses will be:
Termination Clause A ;
Termination Clause B ;
Termination Clause C ;
Termination Clause D ;
Termination Clause E ; and
Termination Clause F.
Example 2
In this example the span is repeated. There is only one {Mark} which will itself be repeated.
The company [
NumberDirectors Is 1
director is][NumberDirectors IsMoreThan 1
directors are] [Repeat NumberDirectors Punctuation ", | and |"
{DirectorName}{Mark}]. If the only director is John then the punctuated paragraph will be:
The company director is John.
If the directors are John and Mary then the punctuated paragraph will be:
The company directors are John and Mary.
If the directors are John, Mary, Paul and David then the punctuated paragraph will be:
The company directors are John, Mary, Paul and David.