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


next up previous contents index
Next: table.renamecol - Function Up: table - Tool Previous: table.removerows - Function


table.addcols - Function



Package utility
Module table
Tool table


add one or more columns


Synopsis
addcols(desc, dminfo)


Description
Columns can be added to a table that was opened readonly=F. The new columns will be filled with a default value (0 or blank).
For each column to be added a column description has to be setup using function tablecreatescalarcoldesc or tablecreatearraycoldesc. When multiple columns are used, they have to be combined in a single record using tablecreatedesc.
It is possible to specify data manager info in order to define a data manager (storage manager or virtual column engine) for the columns to be added.



Arguments

desc in Description of one or more columns
    Allowed: Descriptor
dminfo in Optional description data manager to use
    Allowed: Record
    Default: F


Returns
Bool


Example
  t:=table("mytable", readonly=F)
  dc3:=tablecreatescalarcoldesc('C3', 'a')   
  dc4:=tablecreatescalarcoldesc('C4', as_float(0))
  dc5:=tablecreatearraycoldesc('C5', as_double(0), 2, [10,20])
  t.addcols(dc3)
# T
  t.addcols(tablecreatedesc(dc4, dc5))
# T
A single column can be added as such, but multiple columns have to be combined.





next up previous contents index
Next: table.renamecol - Function Up: table - Tool Previous: table.removerows - 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