The process of saving Objects is very straightforward. You can simply write any Object to a Channel using the AST_WRITE function, as follows:
INTEGER NOBJ, OBJECT ... NOBJ = AST_WRITE( CHANNEL, OBJECT, STATUS )
The effect of this will be to produce a textual description of the Object which will appear, by default, on your program's standard output stream. Any class of Object may be converted into text in this way.
AST_WRITE returns a count of the number of Objects written. Usually,
this will be one, unless the Object supplied cannot be
represented. With a basic Channel all Objects can be represented, so a
value of one will always be returned unless there has been an
error. We will see later, however, that more specialised forms of
Channel may impose restrictions on the kind of Object you can write
(). In such cases, AST_WRITE may
return zero to indicate that the Object was not acceptable.
AST A Library for Handling World Coordinate Systems in Astronomy