fdds_openpr - open print file
SYNOPSIS
#include <fdds.h> (fixed-format sources)
#include <f90dds.h> (free-format sources)
integer function fdds_openpr(pname, id)
-
character*(*) pname
character*(*) id
DESCRIPTION
fdds_openpr opens a printfile. It first checks the command line
for a user request of online help via the "help=" switch using
fdds_switch. If help is requested, a standard
header is written to the console and the return value is 1 (or 2 if
non-DDS command arguments are present). Otherwise, a unique print file
is opened up, a standard header is written to it, and the return value
is 0. The print file is created using the program name, pname.
(The actual printfile can be controlled at runtime. See
Printout File.)
If the file cannot be opened, the return value is -1.
If a file is already opened, the return value is -2.
The standard header is written by fdds_prthdr using the
program name, pname, and RCS Id, id (see NOTE on RCS).
The other print routines can write to this print file.
NOTE: The RCS Id is a Revision Control Sysem keyword
(CVS, RCS or Subversion). However, this parameters is really no
longer used if the DDS Application makefiles are used. Instead,
a svn_version.c file is created in the object directory and built
into the code with the current subversion revision number.
That way the revision number in the code will always reflect
the latest revision number.
EXAMPLES
character*4 prog
character*(DICTNAME_MAX) in_dict
parameter (prog='FILT')
integer ier,ofst,pct
real si,angle
...
ier=fdds_openpr(prog, '$Id: openpr.html 57 2009-02-11 23:09:37Z ehlersjw $')
if (ier .gt. 0) then
call help()
stop
endif
SEE ALSO
fdds_savepr Redirect to printfile
fdds_prthdr Print header
fdds_sprintf Print to string
fdds_prtmsg Print a message
fdds_prtcon Print to console
fdds_prterr Print error message
fdds_errors Query errors
fdds_info Control printing
fdds_closepr Close printfile
AUTHOR
Jerry Ehlers, BP America (May 2003)