functioncopy_bindingprivate
integer function copy_binding(p, item, id) result(copy)
Add to type id a copy of generic binding item, returning the copy.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| p | type(project_t) | inout | the project | |
| item | integer | in | the binding | |
| id | integer | in | the type |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| copy | integer |
Calls
Source
Show the code
integer function copy_binding(p, item, id) result(copy)
type(project_t), intent(inout) :: p !! the project
integer, intent(in) :: item !! the binding
integer, intent(in) :: id !! the type
integer :: file
copy = p%list%add(E_BOUNDPROC, id)
file = p%list%box(copy)%e%file
p%list%box(copy)%e = p%list%box(item)%e
if (p%list%box(item)%e%kind /= E_VARIABLE) allocate (p%list%box(copy)%e%more, source=p%list%box(item)%e%more)
p%list%box(copy)%e%parent = id
p%list%box(copy)%e%file = file
end function copy_binding