Manual Reference Pages  - DESTROY_WATCHGROUP (3)

NAME

destroy_watchgroup(3f) - [M_stopwatch] destroys a M_StopWatch watch group (LICENSE:PD)

CONTENTS

Synopsis
Description
Diagnostics
Examples
Bugs
Author
See Also

SYNOPSIS

subroutine destroy_watchgroup(handle, err)

type (watchgroup), intent(INOUT) :: handle
integer, optional, intent(OUT) :: err

DESCRIPTION

Destroys a watch group. Only the group is destroyed, not the watches in the group. To avoid memory leaks, watch groups should be destroyed when no longer useful, before being recreated, and before returning from a subroutine in which the watch group is a local variable.

The argument handle is a variable of type watchgroup that is the handle for the group to be destroyed.

DIAGNOSTICS

If present, the optional intent OUT integer argument err returns a status code. The code is the sum of the values listed below.

An error message will be printed to a specified I/O unit (unit 6 by default) if print_errors is TRUE (default is TRUE). The error message contains more detail about the cause of the error than can be obtained from just the status code, so you should set print_errors to TRUE if you have trouble determining the cause of the error.

If abort_errors is TRUE (default is FALSE), the program will terminate on an error condition. Otherwise, the program will continue execution but the watch group will not be created.

See option_stopwatch(3) for further information on print_errors, abort_errors and I/O units.

The relevant status codes and messages are:

0 No errors; execution successful.

1024 Error occurred while deallocating memory. This error occurs if the Fortran deallocate statement returns a nonzero status while deallocating memory used for the group. The group is destroyed, but be aware that other problems could develop as a result of the deallocate error.

EXAMPLES

type (watchgroup) g1, g2 integer errcode

call destroy_watchgroup(g1) call destroy_watchgroup(g2, errcode)

The first call destroys the group g1. The second call destroys the group g2 and returns a status code.

BUGS

None known.

AUTHOR

William F. Mitchell, william.mitchell@nist.gov National Institute of Standards and Technology

SEE ALSO

M_stopwatch(3), create_watch(3), destroy_watch(3), end_pause_watch(3), inquiry_stopwatch(3), join_watchgroup(3), leave_watchgroup(3), option_stopwatch(3), pause_watch(3), print_watch(3), read_watch(3), reset_watch(3), start_watch(3), stop_watch(3)


M_StopWatch 1.1 DESTROY_WATCHGROUP (3) September 22, 2017
Generated by manServer 1.08 from destroy_watchgroup.3m_stopwatch.txt using man macros.