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.print - Function Up: componentlist - Tool Previous: componentlist.add - Function


componentlist.replace - Function



Package synthesis
Module componentmodels
Tool componentlist


Replace components in the list.


Synopsis
replace(which, list, whichones)


Description

The replace function replaces the components from the list with the specified components from another list. The source list can be opened readonly and the length of the vectors in the first and third arguments must the the name.

You cannot replace components in a list that has been opened read only.



Arguments

which A vector of indices specifying the components to replace
Allowed: A vector with indices between 1 and the list length
Default: no default
list The list containing the components to copy
Allowed: A componentlist tool
Default: no default
whichones A vector of indices specifying the components to copy
Allowed: A vector with indices between 1 and the length of the list in the second argument
Default: F


Returns
nothing





Example
      include 'componentlist.g'
      newcl := componentlist('core', readonly=F);
      othercl := componentlist('centarusA.cl', readonly=T);
      newcl.replace(1:2, othercl, [10,13]);
This example replaces components 1 and 2 in the newcl list with components 10 & 13 from the othercl list.


next up previous contents index
Next: componentlist.print - Function Up: componentlist - Tool Previous: componentlist.add - 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