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

Public Member Functions

subroutine dcclockputline0 (clk, unit, indent, err)
 

Detailed Description

Definition at line 182 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockputline0()

subroutine dc_clock::putline::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 608 of file dc_clock.f90.

609 use dc_types, only: stdout
610 use dc_message, only: messagenotify
611 use dc_string, only: printf, tochar, cprintf
612 use dc_date, only: evalsec, evalday, tochar
614 use dc_types, only: dp
615 implicit none
616 type(CLOCK), intent(in):: clk
617 integer, intent(in), optional:: unit
618 character(*), intent(in), optional:: indent
619 logical, intent(out), optional:: err
620 integer:: out_unit
621 character(STRING):: cause_c
622 integer:: stat
623 integer:: indent_len
624 character(STRING):: indent_str
625 character(*), parameter:: subname = 'DCClockPutLine'
626 continue
627 call beginsub(subname)
628 stat = dc_noerr
629 cause_c = 'CLOCK'
630 if (.not. clk % initialized) then
631 call messagenotify('W', subname, 'Call Create before PutLine in dc_clock.')
632 call dbgmessage('Ignored because input argument was not initialized.')
633 stat = dc_enotinit
634 goto 999
635 end if
636 if (present(unit)) then
637 out_unit = unit
638 else
639 out_unit = stdout
640 end if
641 indent_len = 0
642 indent_str = ''
643 if (present(indent)) then
644 if (len(indent) /= 0) then
645 indent_len = len(indent)
646 indent_str(1:indent_len) = indent
647 end if
648 end if
649 call printf(out_unit, &
650 & indent_str(1:indent_len) // &
651 & '#<CLOCK:: @name=%c @clocking=%y @elapsed_time=%f sec. %c @start_date=%c>', &
652 & c1=trim(clk % name), l=(/clk % start_time > 0.0_dp/), &
653 & d=(/clk % elapsed_time/), &
654 & c2=trim(fit_unit_value(clk % elapsed_time)), &
655 & c3=trim(tochar(clk % start_date)))
656 call dbgmessage('name=%c, output to device number %d', &
657 & c1=trim(clk % name), i=(/out_unit/))
658999 continue
659 call storeerror(stat, subname, err, cause_c)
660 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

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