Having created an empty FitsChan (), you can write any AST Object to it in the native encoding using the AST_WRITE function. Let us assume we are writing a SkyFrame,23 as follows:
INTEGER NOBJ, SKYFRAME ... NOBJ = AST_WRITE( FITSCHAN, SKYFRAME, STATUS )
Since we have selected the native encoding (), there are no restrictions on the class of Object we may write, so AST_WRITE should always return a value of one, unless an error occurs. Unlike a basic Channel (), this write operation will not produce any output from our program. The FITS headers produced are simply stored inside the FitsChan.
After this write operation, the Ncard attribute will be updated to reflect the number of new cards added to the FitsChan and the Card attribute will point at the card immediately after the last one written. Since our FitsChan was initially empty, the Card attribute will, in this example, point at the end-of-file ().
The FITS standard imposes a limit of 68 characters on the length of strings which may be stored in a single header card. Sometimes, a description of an AST Object involves the use of strings which exceed this limit (e.g. a Frame title can be of arbitrary length). If this occurs, the long string will be split over two or more header cards. Each ``continuation'' card will have the keyword CONTINUE in columns 1 to 8, and will contain a space in column 9 (instead of the usual equals sign). An ampersand (``&'') is appended to the end of each of the strings (except the last one) to indicate that the string is continued on the next card.
Note, this splitting of long strings over several cards only occurs when
writing AST Objects to a FitsChan using the AST_WRITE routine and the
native encoding. If a long string is stored in a FitsChan using
(for instance) the AST_PUTFITS or AST_PUTCARDS routine, it will simply be truncated.
AST A Library for Handling World Coordinate Systems in Astronomy