Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/gipsy/tsk/coder.dc1
Дата изменения: Mon Mar 30 18:21:17 1998
Дата индексирования: Fri Jan 16 00:07:20 2009
Кодировка:

Поисковые слова: п п п п п п п п п р п р п р п р п р п р п р п р р п п р п п р п

Name: CODER

Purpose: Create C-code for simple programs

Category: UTILITY, COMPILE

File: coder.c

Author: M. Vogelaar

Keywords:

PROGRAM= Name of C-program: [example]
Name of C-file (without extension '.c') that
will be created.


OVERWRITE= File exists, overwrite? [Y]/N
If the name in PROGRAM= already exists, you are
warned. If you select OVERWRITE=N you are prompted to
give a new name.


PURPOSE= Purpose line: [.......]
Each application document has one line explaining
the purpose of the application.


CATEGORY= Category/ies (separated by comma): [list]
Each application belongs to a certain category. To
obtain a list of available categories press carriage
return. The input can contain more than one categories,
each category is separated by a comma. A category
input can contain spaces, but these spaces are removed
in the output. The categories are matched, so you need
to give only a couple of characters for a category.


AUTHOR= Name of Author: [default given by program]
Each application document must include the name of
the author. The default is your username.


MAXSUBSETS= Max number of subsets in your program: [1024]
The maximum number of subsets the program can
deal with.


OUTPUT= Do you want to create an output set: Y/[N]
If OUTPUT=Y, your new program contains routines
for creating an writing to a new output set.


TOASCII= Do you want to create an ASCII file? Y/[N]
If TOASCII=Y, a function will be included which
returns a pointer to a file if a file name is specified.
There is also a build in check whether a file already
exists.


PGPLOT= Prepare for using PGPLOT routines: Y/[N]
PGPLOT routines are used for graphic purposes.
To use these routines in a simple way, some setup
routines are included in your new program if PGPLOT=Y


UPDATENAME= Update name: [default given by program]
The update name is a 3 character code, used
to indicate in the application document who installed
or updated the program.



Description: CODER is a document and C-code generator for simple
GIPSY programs. Purposes of CODER:

1) Create a standard application document.
2) Create a well documented C-program that can be used
as a program template.
3) Illustrate the use of input-, output- and plot
functions.

A standard document includes a copyright notice, a
program name (PROGRAM=), a purpose line (PURPOSE=),
a category indication (CATEGORY=), the program name
to which the document belongs, the author name
(AUTHOR=), a list of descriptions of the used
keywords, a description of the program, some notes
and an example of the use of the program. The final
item is an update notice including a reference to
a name (UPDATENAME=). If an item cannot be filled in
by CODER, a dummy or template is created.
Default, the coder creates a program that can read
data from a set and calculates the sum of all
image values in a given box. The maximum number of
subsets you want to use in your new program is
given in MAXSUBSETS=. For most applications the
default number will be enough.
CODER creates a number of useful macros. It defines
macros for creating Fortran compatible character
strings and macros to control array sizes for
instance. Also the version of your program is set in
RELEASE (which is identical to 1.0 if you are using
CODER). Adjust the definitions to your own taste.If
for example you want to avoid the use of a small I/O
buffer in your new program, adjust the value of
the macro MAXBUF manually after CODER is finished.

There are two major extensions to this elementary
GIPSY code: first, you can add some output code
with OUTPUT=Y. This generates code for creating an
output set and for writing your input data to
this output set. A simple operation on the input
data is also included.
Second, if PGPLOT=Y, the coder generates program
lines for the use of PGPLOT graphic routines.
For the setup of PGPLOT a function initplot is
generated. The keywords used in this function
are put and explained in the document of your new
application. A function to draw a box is also
included. Again, all these generated code can be
used as example material or as template code.
If you are completely new to C-programming, learn
a bit of C first, read the GIPSY programmers manual
and use this program to write your first application.


Updates: May 11, 1992: VOG, Document created.
Dec 20, 1994: VOG, Read category file in $gip_doc
Apr 20, 1995: VOG, A lot of minor changes
Mar 30, 1998: VOG, changes in defines for RAD and ABS