Next: Application Code
Up: No Title
Previous: Requirements
ASTERIX code is written under the rules of Starlink programming, a standard
to which it generally conforms with 99% of the time. Thus much of the code
is written as calls to various subroutines. These provide various facilities
designed to make the job of code writing as simple as possible. The outline of this
first application, to open an ASTERIX data file, read some values from it,
modify those values and update the original file - is as follows;
-
All ASTERIX applications are written as a subroutine. The main code from which this
is called is automatically and invisibly generated during the linking stage.
-
The ASTERIX system must be initialised. This also takes care of all other Starlink
initialisations.
-
A file name must be supplied and this file then located and opened. All this is taken
care of by the parameter sub-system (see Starlink User Note 114, PAR - Interface to the ADAM
Parameter System, for more details).
-
The required data values are located and mapped within the data file. This is
done through the use of pointers for the opened file and mapped data.
-
A further subroutine is called to expand and evaluate the obtained data pointers,
such that use can be made of the values to which they point.
-
The ASTERIX system is closed down. This releases all resources, pointers, unmaps data
values and closes opened files.
Asterix
Tue Feb 10 12:19:15 GMT 1998