You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Description

Use to delete elements from a dynamic array. Data can be deleted from field, value, and subvalue positions.

Syntax

modifiedarray = Delete (array, field, value, subvalue)

Parameters

The Delete function has the following parameters.

ParameterDescription
arrayThe dynamic array that is to be modified.
FieldThe field position to delete. value and subvalue must be 0 (zero) to delete the field.
valueThe value position to delete. subvalue must be 0 (zero) to delete value, and field must be greater than 0 (zero).
subvalueThe subvalue position to delete. field and value must be greater than 0 (zero) to delete subvalue.

See also

Insert()ExtractReplace()

Example

list = "BOB": @fm: "SUE": @fm: "JOE"
* Remove SUE from an @fm-delimited list
locate "SUE" in list using @fm setting Pos then
list = delete (list, Pos, 0, 0)
end
 
* If the list were @vm-delimited:
list = "BOB": @vm: "SUE": @vm: "JOE"
locate "SUE" in List using @vm setting Pos then
list = delete (List, 1, Pos, 0)
end
  • No labels