REMOVE

REMOVE


REM Index Level REPEAT
Syntax REMOVE variable FROM dynamic.array AT position.variable SETTING delimiter.variable
Category BASIC
Type Statement
Description removes a substring delimited by a system delimiter from a dynamic array.

Before the initial call, position.variable must be set to zero.  The variable is updated with the end of the current substring at the end of every call.

The delimiter.variable is updated with the code indicating the delimiter found at the end of the substring returned.  The code is one of the following:

0 = end of string
2 = attribute mark - ASCII char(254)
3 = value mark     - ASCII char(253)
4 = subvalue mark  - ASCII char(252)
5 =                        char(251)
6 =                        char(250)
Options
See Also dynamic array $OPTIONS
Example x = "a":@am:"b":@vm:"c"
l = 0
remove xx from x at l setting d
print xx,l,d
remove xx from x at l setting d
print xx,l,d
remove xx from x at l setting d
print xx,l,d

This will print the following result:
a      2       2
b      3       3
c      5      0
Warnings This statement requires the setting of extended compiler options.  See the "$options" statement for more information.
Compatibility D3 7.0 R91
REM Index Level REPEAT