Variable-array parts
A variable-array phrase part describes a message part that is made up of a
variable number of characters. Variable-arrays are restricted to the cases. By looking at
each succeeding character in isolation, it can be determined if it belongs in the variable
array. This property is reflected by the fact that component
is a character set.
On input, the variable array matches as many successive characters in the
component
character set as possible.
-
component
can be more than a single character. It can be a character constant, a named character set, or a composition of a character set usingnot
oror.
- If
component
isany
, then this form has special meaning. Use this form inside a length-encoded region.
Except for length-encoded phrase parts, use variable-arrays to read a variable-length field up to some terminating character.
For example:
define phrase a-phrase;
field line = variable-array(not(<cr>));
<cr>;
<lf>;
end phrase;
Note: Do not use a variable-length field at the
end of a phrase. The PDL would not know when to stop trying to read characters for the
field.