next up previous 264
Next: ...Build an AST Program
Up: How To...
Previous: ...Obtain and Install AST

...Structure an AST Program

An AST program normally has the following structure:

/* Include the interface to the AST library. */
#include "ast.h"

/* Main program (or could be any function). */
main () {
   <normal C declarations and statements>

/* Enclose the parts which use AST between the astBegin and astEnd macros. */
   astBegin;
   <C statements which use AST>
   astEnd;

   <maybe more C statements>
}

The use of astBegin and astEnd is optional, but has the effect of tidying up after you have finished using AST, so is normally recommended. For more details of this, see [*]. For details of how to access the ``ast.h'' header file, see [*].


next up previous 264
Next: ...Build an AST Program
Up: How To...
Previous: ...Obtain and Install AST

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
25th February 2013
E-mail:starlink@jiscmail.ac.uk

Copyright (C) 2014 Science \& Technology Facilities Council