Home Online Manual
Top
Back: degree
Forward: denominator
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.20 delete

Syntax:
delete ( list_expression, int_expression )
delete ( intvec_expression, int_expression )
delete ( ideal_expression, int_expression )
delete ( module_expression, int_expression )
Type:
type of the first argument
Purpose:
deletes the element with the given index from a list/intvec/ideal/module (the input is not changed).
Example:
 
  list l="a","b","c";
  list l1=delete(l,2);l1;
==> [1]:
==>    a
==> [2]:
==>    c
  l;
==> [1]:
==>    a
==> [2]:
==>    b
==> [3]:
==>    c
  delete(1..5,2);
==> 1,3,4,5
  ring r=0,(x,y,z),dp;
  delete(maxideal(1),1);
==> _[1]=y
==> _[2]=z
See ideal; insert; intvec; list; module.