gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_clock::dcclockputline Interface Reference

Public Member Functions

subroutine dcclockputline0 (clk, unit, indent, err)
 

Detailed Description

Definition at line 135 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockputline0()

subroutine dc_clock::dcclockputline::dcclockputline0 ( type(clock), intent(in)  clk,
integer, intent(in), optional  unit,
character(*), intent(in), optional  indent,
logical, intent(out), optional  err 
)

Display CLOCK variable information

Displays information about a CLOCK type variable. Specify the output unit number in unit. If unit is not given, output goes to standard output.

If clk has not been initialized by DCClockCreate, an error is raised. If err is provided, .true. is returned in err and the program continues.

Parameters
[in]clkCLOCK type variable
[in]unitOutput unit number (optional). Default: standard output.
[in]indentIndent of displayed messages (optional)
[out]errError flag (optional). .true. if error occurred.

Definition at line 604 of file dc_clock.f90.

605 use dc_types, only: stdout
606 use dc_message, only: messagenotify
607 use dc_string, only: printf, tochar, cprintf
608 use dc_date, only: evalsec, evalday, tochar
610 use dc_types, only: dp
611 implicit none
612 type(CLOCK), intent(in):: clk
613 integer, intent(in), optional:: unit
614 character(*), intent(in), optional:: indent
615 logical, intent(out), optional:: err
616 integer:: out_unit
617 character(STRING):: cause_c
618 integer:: stat
619 integer:: indent_len
620 character(STRING):: indent_str
621 character(*), parameter:: subname = 'DCClockPutLine'
622 continue
623 call beginsub(subname)
624 stat = dc_noerr
625 cause_c = 'CLOCK'
626 if (.not. clk % initialized) then
627 call messagenotify('W', subname, 'Call Create before PutLine in dc_clock.')
628 call dbgmessage('Ignored because input argument was not initialized.')
629 stat = dc_enotinit
630 goto 999
631 end if
632 if (present(unit)) then
633 out_unit = unit
634 else
635 out_unit = stdout
636 end if
637 indent_len = 0
638 indent_str = ''
639 if (present(indent)) then
640 if (len(indent) /= 0) then
641 indent_len = len(indent)
642 indent_str(1:indent_len) = indent
643 end if
644 end if
645 call printf(out_unit, &
646 & indent_str(1:indent_len) // &
647 & '#<CLOCK:: @name=%c @clocking=%y @elapsed_time=%f sec. %c @start_date=%c>', &
648 & c1=trim(clk % name), l=(/clk % start_time > 0.0_dp/), &
649 & d=(/clk % elapsed_time/), &
650 & c2=trim(fit_unit_value(clk % elapsed_time)), &
651 & c3=trim(tochar(clk % start_date)))
652 call dbgmessage('name=%c, output to device number %d', &
653 & c1=trim(clk % name), i=(/out_unit/))
654999 continue
655 call storeerror(stat, subname, err, cause_c)
656 call endsub(subname)
Date and time manipulation module.
Definition dc_date.f90:57
Error handling module.
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_noerr
Error storage variables
Definition dc_error.f90:468
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
Definition dc_error.f90:534
Message output module.
Handling character types.
Definition dc_string.f90:83
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public stdout
Unit number for Standard OUTPUT
Definition dc_types.f90:117
integer, parameter, public dp
Double Precision Real number
Definition dc_types.f90:92

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, dc_types::dp, dc_trace::endsub(), dc_types::stdout, and dc_error::storeerror().

Here is the call graph for this function:

The documentation for this interface was generated from the following file: