Next: Suppressing the Use of Selected Control Characters
Up: Using GRP Routines
Previous: Deleting Names
Changing the Characters Used to Control the Syntax of Group
Expressions
A set of ``control characters'' are used to indicate various items of
syntax within
a group expression. Each group is created with a set of default control
characters, but these can be changed by subsequent calls to GRP_SETCC. Each
group has its own set of control characters which can be different to those of
other groups, and they can be inspected using routine
GRP_GETCC. When calling
these routines, specific control characters are represented by the following
names:
- INDIRECTION
- - The character used to indicate that the string which
follows is not a literal name but is the name of a text file from which further
names are to be read. The INDIRECTION control character defaults to
``
^''.
- COMMENT
- - The character used to indicate that the remainder of the group
expression (or record within a text file) is a comment and is to be ignored.
The COMMENT control character defaults to ``#''.
- DELIMITER
- - The character used to delimit elements within a group
expression. The DELIMITER control character defaults to ``,''.
- NAME_TOKEN
- - The character used within a modification element as a
token for each name in the basis group. The NAME_TOKEN character defaults to
``
''.
- SEPARATOR
- - The character used to separate old and new substitution
strings when editing a group of names. The SEPARATOR character defaults to
``
''.
- OPEN_NEST
- - The character used to open a nest within a group
expression, within which any DELIMITER characters are ignored. The OPEN_NEST
character defaults to ``(''.
- CLOSE_NEST
- - The character used to close a nest within a group
expression, within which any DELIMITER characters are ignored. The CLOSE_NEST
character defaults to ``)''.
- FLAG
- - The character which can be used to flag selected group
expressions by appending it to the end of the group expression. The presence of
the flag is communicated to the calling application by means of the FLAG
argument of routines GRP_GROUP and GRP_GRPEX. The FLAG character defaults
to ``-''.
- OPEN_KERNEL
- - The character used to open a kernel within an element.
The OPEN_KERNEL character defaults to ``{''.
- CLOSE_KERNEL
- - The character used to close a kernel within an element.
The CLOSE_KERNEL character defaults to ``}''.
- NULL
- - This is a character which can be assigned to any other control
character to suppress use of that control character (see below). The NULL
character defaults to ``%''.
- ESCAPE
- - This is a character which can be used to ``escape'' another
control character within a group expression. If a GRP control character is
encountered within a group expression, its special meaning is ignored
and it is treated literally if it is preceeded by an escape character.
Such escape characters are removed before storing the corresponding
strings in the returned group (escape character which do not preceed
another control character are not removed). Escape characters can
themselves be escaped. By default, the escape character is equal to the
null character (i.e. escaping is not available by default).
Subsections
Next: Suppressing the Use of Selected Control Characters
Up: Using GRP Routines
Previous: Deleting Names
GRP Routines for Managing Groups of Objects
Starlink User Note 150
D.S. Berry
21st October 2009
E-mail:ussc@star.rl.ac.uk
Copyright © 2009 Science and Technology Facilities Council