There is sometimes a clash of interests to be resolved when deciding on the best choice for the character which delimits elements within a group expression. The default delimiter character is the comma, but this character can sometimes be useful within an element, for instance when specifying a set of indices. For instance, if the user gave the group expression:
A(1,2),B(3,10)
in which each element is a literal name corresponding to an array element, it would be wrong to split this up using the commas as delimiters into the four strings ``A(1'', ``2)'', ``B(3'' and ``10)''.
To get round this particular problem, GRP ignores delimiters which occur within
matching ``nesting characters''. There are two nesting characters, the ``open
nest'' character (usually set to ``('') and the ``close nest'' character
(usually set to ``)''). Thus in the above example, the commas occurring within
the parentheses would not be treated as delimiters, resulting in the group
expression being split into the two elements A(1,2) and B(3,10). The
characters to use as the opening and closing nest characters may be set by the
calling application (see section
).
GRP Routines for Managing Groups of Objects