Created Date: 16 Mar, 2022 15:04
Last Modified Date: 16 Mar, 2022 15:04


This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP.

When parsing comments, the Harlequin RIP basically treats part of the text of the comment as the name of a procedure to be executed. The procedure is passed the remainder of the comment as a string on the operand stack.

For example, consider the conventional comment:

%%CreationDate: September 24, 2006

A procedure called CreationDate , without the leading %% , would be called with the string operand (: September 24, 2006). On the other hand, we could have a procedure called CreationDate: — named including a colon and trailing space as (CreationDate: ) —which receives the string (September 24, 2006). Both examples are feasible.

Comment parsing has three parts:

  • an extension built into the Harlequin RIP that recognizes % and %% symbols and, instead of discarding them, passes the rest of the line on to
  • a mechanism built into the Harlequin RIP, which calls the correct procedures according to which comment is being processed
  • a set of procedures that you supply to process individual comments.

The Harlequin RIP as delivered is provided with procedures to detect and act on certain comments (for example, to detect printer-driver prep files in response to the %%IncludeProcSet comment and others). The Harlequin RIP’s own definitions are contained in the procset HqnParseComments (the name being mapped to a file by the same name in the procsets subdirectory of SW ).

To detect and act on a particular comment requires a procedure or procedures to be set up using the mechanism described below.

You can put your code in a number of places, according to the required functionality and version of the RIP.

  • If the same action is required in all circumstances, it can be included in the bootstrap sequence by adding it in the file HqnOEM in the SW/Sys folder / directory or into its own file in the SW/Sys/ExtraStart folder.
  • If the sequence is required on some jobs and not others, it can be made into a page feature or configuration file (for Harlequin Core).
  • If you have some control over the jobs themselves, the custom constructs could be included with the job.