Next: Keywords and File Identifiers, Previous: Recursive Keyword Replacement, Up: Keywords
Sometimes, you want keyword replacement data to appear without the
leading $keyword:
and trailing `$'. A formatted keyword
instance allows this. An appearance in your file of
$Format: "string"$ string
will cause prcs checkin
to replace the next line of the source
file (i.e., the line after the second `$') with string, after
first making modified keyword substitutions in it. Specifically, each
instance of $
keyword$
in string (for which
keyword is one of the recognized keywords) is replaced by just the
data that would be placed to the right of the `:' in a simple
keyword instance. The Format
instance itself is not
altered—only the subsequent line. For example, if a file in a project contains
/* $Format: "static char* version = \"$ProjectVersion$\";"$ */ static char* version = "x.x";
then the version of the file checked in for version 1.2 of the project will contain
/* $Format: "static char* version = \"$ProjectVersion$\";"$ */ static char* version = "1.2";
The format string may not contain newlines. It may contain quotation
marks if they are stropped with a backslash, as in the example above.
In general, the backslash quotes the succeeding character. Any keyword
instances on a list after a Format
instance are ignored (that is,
they are left unchanged by keyword substitution). Any nested instance
of Format
is also left unchanged.