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.putkeywords - Function Up: table - Tool Previous: table.getcolkeywords - Function


table.putkeyword - Function



Package utility
Module table
Tool table


put a specific table keyword


Synopsis
putkeyword(keyword, value, makesubrecord)


Description
Put a table keyword. The value of the keyword can be a scalar or an array of any type or it can be a record.
It is possible to define a keyword holding a subtable. In that case a special string containing the name of the subtable will be passed to the table client.
It is possible that the value of a keyword is a record itself (arbitrarily deeply nested). A field in such a subrecord can be written by separating the name with dots. If a subrecord does not exist, an error is returned unless makesubrecord=T is given. In such a case intermediate records are created when needed.



Arguments

keyword in Name or seqnr of keyword
    Allowed: String|Int
value in Value of keyword
makesubrecord in Create intermediate records
    Allowed: Bool
    Default: F


Returns
Bool


Example
  t:=table("MS", readonly=F)
  t.putkeyword("VERSION", "1.66")
# T
#      define ANTENNA subtable
  t.putkeyword("ANTENNA", 'Table: MS/ANTENNA')
  t.flush()
# T
#      write a field in a record and create subrecords when needed
  t.putkeyword("REC.SUB.FLD", "val", T)
# T
#      write a keyword with a record value
  t.putkeyword("REC", [SUB=[FLD="val"]])
# T
Note that the last example does the same as the previous one (assuming that REC does not exist yet with other fields).





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