14
15
16
17
18
19
20
21
22
23
24
25
27 use gtdata_generic,
only: attr_rewind, attr_next,
gtvarcopyattr
28 use dc_present,only:present_and_true, present_and_false
31 use dc_trace, only: beginsub, endsub, dbgmessage
33 type(gt_variable), intent(inout):: to
34 type(gt_variable), intent(inout):: from
35 logical, intent(out), optional:: err
36 logical, intent(in), optional:: global
37 character(len = *), parameter:: subnam = "GTVarCopyAttrAll"
38 character(len = STRING):: aname
39 logical:: end
40continue
41 if (present(err)) err = .false.
42 call beginsub(subnam)
43 call attr_rewind(from)
44 do
45 call attr_next(from, aname, end)
46 if (end) exit
47 if ( (present_and_false(global)) .and. (aname(1:1) ==
gt_plus) )
then
48 call dbgmessage("Ignored attr=%c", c1=aname)
49 cycle
50 end if
51 call dbgmessage("Copied attr=%c", c1=aname)
53 if (present_and_true(err)) err = .false.
54 enddo
55 call endsub(subnam)
subroutine gtvarcopyattr(to, attrname, from, err)
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
character, parameter, public gt_plus