• fdds_prtmsg prints a message to the printout file (if opened) or to the terminal (via stderr:). It is always advisable to print back out what the program read in for the user parameters. This will document what parameters the program is using. If the user had any typo's, then this will reflect a possible different value than expected. Also, most typo's will result in a parameter definition not being read and should indicate this at the end of the printout file. A typical printout of user parameters may look something like:
          ier=fdds_prtmsg('\n*** USER PARAMETERS ***\n\n\0')
          ier=fdds_prtmsg('\tscale = %g\n\0',scale)
          ier=fdds_prtmsg('\tnsout = %d\n\0',nsout)
          ier=fdds_prtmsg('\tmute values:\0')
          do i=1,n
              ier=fdds_prtmsg(' %d\0',mute(i))
          enddo
          ier=fdds_prtmsg('\n\0')
          ier=fdds_prtmsg('\tmode  = %s\n\0',mode)
          ier=fdds_prtmsg('\n\0')
    
          if (mem .le. 0) then
              ier=fdds_prterr('MEMORY ALLOCATED = %f MB\n\0', mem)
          else
              if (verbose) then
                  ier=fdds_prtcon('Memory allocated = %f MB\n\0', mem)
              else
                  ier=fdds_prtmsg('Memory allocated = %f MB\n\0', mem)
              endif
          endif
            
  • fdds_prtcon prints a message to the printout file (if opened) and to the terminal. So this is appropriate for WARNING type messages.

  • fdds_prterr prints a message to the printout file and to the terminal with "ERROR: " tacked onto the beggining of the message. In addition, DDS keeps track of the number of these error messages which can be retrieved by fdds_errors. When a program is terminated with a call to fdds_closepr the number of these API errors is printed out, a status message is given (indicating Normal or Abnormal completion) and a return status is given from the executable of 0 for Normal or non-zero for Abnormal completion.