A. delete()

Read(149) Label: delete, specified,

Description:

Delete specified members from a sequence.

Syntax:

A.delete(k)

Delete the kth member

A.delete(p)

Delete the members whose sequence numbers exist in p

Note:

The function deletes the kth member or the members whose sequence numbers exist in p from sequence A, and automatically updates the index, if any, and checks distinctness.

Parameters:

A

A sequence

k

A positive integer that indicates the position of a member to be deleted in the sequence

p

An integer sequence with the length of n that specifies the positions of the members to be deleted

Options:

@n

Return the deleted record or a record sequence of the deleted records

Return value:

A sequence

Example:

 

A

 

1

=["a","c","d","e","f"]

 

2

=A1.delete([2,4,5])

[a,d]

3

=demo.query("select * from STUDENTS")

 

4

=A3.delete@n(2)

Return the deleted record

Related functions:

A.insert()

A.modify()

T.delete()