Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: componentlist.purge - Function Up: componentlist - Tool Previous: componentlist.concatenate - Function


componentlist.remove - Function



Package synthesis
Module componentmodels
Tool componentlist


Remove a component from the list.


Synopsis
remove(which, log)


Description

The remove function removes the specified component(s) from the list. Components are specified by numbering them from one to the length of the list. So removing component one will remove the first component. After using this function all the remaining components will be shuffled down so that component two becomes component one. You cannot remove components from a list that has been opened read only.

You can specify a vector of indices to remove a number of components at once. For example in a five element list removing elements [1,3,5] will result in a two element list, now indexed as elements one and two, containing what was previously the second and fourth components. Components that have been deleted using this function are not lost. The recover function can be used to get them back unless the purge function has been executed. Then they are completely gone.



Arguments

which indices of which component(s) to remove
Allowed: a vector containing unique integers between 1 and the length of the list
Default: no default
log Send a message to the logger
Allowed: Boolean
Default: T


Returns
nothing


Example
      include 'componentlist.g'
      cl := componentlist('crux.cl');
      cl.remove(1);
This example reads a componentlist from an AIPS++ table and removes the first element from the list.



next up previous contents index
Next: componentlist.purge - Function Up: componentlist - Tool Previous: componentlist.concatenate - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15