idlastro / FITS ASCII & Binary Table I/O: FTADDCOL

[Source code]

NAME
FTADDCOL
PURPOSE
Routine to add a field to a FITS ASCII table
CALLING SEQUENCE
ftaddcol, h, tab, name, idltype, [ tform, tunit, tscal, tzero, tnull ]
INPUTS
h - FITS table header.  It will be updated as appropriate
tab - FITS table array.  Number of columns will be increased if
         neccessary.
name - field name, scalar string
idltype - idl data type (as returned by SIZE function) for field,
         For string data (type=7) use minus the string length.
OPTIONAL INPUTS
tform - format specification 'qww.dd' where q = A, I, E, or D
tunit - string giving physical units for the column.
tscal - scale factor
tzero - zero point for field
tnull - null value for field
Use '' as the value of tform,tunit,tscal,tzero,tnull if you want
the default or no specification of them in the table header.
OUTPUTS
h,tab - updated to allow new column of data
PROCEDURES USED
FTINFO, FTSIZE, GETTOK(), SXADDPAR
HISTORY
version 1  D. Lindler   July, 1987
Converted to IDL V5.0   W. Landsman   September 1997
Updated call to new FTINFO   W. Landsman   April 2000