gtvarcopyattrall.f90

Path: src/gtvarcopyattrall.f90
Last Update: Sun Aug 14 23:10:16 JST 2005

指定された変数のすべての属性を複写する。

Methods

Included Modules

gtdata_types gtdata_generic dc_present dc_url dc_error dc_trace dc_types

Public Instance methods

to :type(gt_variable), intent(inout)
from :type(gt_variable), intent(inout)
err :logical, intent(out), optional
global :logical, intent(in), optional

[Source]

subroutine GTVarCopyAttrAll(to, from, err, global)

    type(gt_variable), intent(inout):: to
    type(gt_variable), intent(inout):: from
    logical, intent(out), optional:: err
    logical, intent(in), optional:: global
    character(len = *), parameter:: subnam = "GTVarCopyAttrAll"
    character(len = STRING):: aname
    logical:: end
    if (present(err)) err = .false.
    call beginsub(subnam)
    call attr_rewind(from)
    do
        call attr_next(from, aname, end)
        if (end) exit
        if ( (present_and_false(global)) .and. (aname(1:1) == GT_PLUS) ) then
           call DbgMessage("Ignored attr=%c", c1=aname)
           cycle
        end if
        call DbgMessage("Copied attr=%c", c1=aname)
        call GTVarCopyAttr(to=to, attrname=aname, from=from, err=err)
        if (present_and_true(err)) err = .false.
    enddo
    call endsub(subnam)
end subroutine

[Validate]