%N assertf %F $MIR/src/subs/assert.for
%D Assert a file existence condition
%P pjt
%: error-handling, file i/o
%B
      SUBROUTINE assertf (name,cond,mesg)

      CHARACTER name*(*), mesg*(*)
      LOGICAL   cond

   Assert that a file exists or does not. Useful to check after
   the keyroutines are called, to prevent lot's of CPU burning
   before program decides it couldn't write it's information.

   Example:
       CALL keya('in',fin,' ')
       CALL assertf(fin,.TRUE.,'File not present')
       CALL keya('out',fout,' ')
       CALL assertf(fout,.FALSE.,'File present')

   Input:
       name  -- name of file to test for
       cond  -- if TRUE file must exist, if FALSE file must not exist
       mesg  -- message passed to bug
