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 "-h" or "help=" switches. 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 parameter is 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    pname
      parameter      (pname='FILT')
      integer        ier
      ...
      ier=fdds_openpr(pname,'$Id: RCS Id $')
      if (ier.ne.0) call help()
    

SEE ALSO

fdds_prtmsg Print a message
fdds_prtcon Print to console
fdds_prterr Print error message
fdds_errors Query errors
fdds_closepr Close printfile
    

AUTHOR

Jerry Ehlers, BP America (May 2003)