subroutinepush_idpureprivate
pure subroutine push_id(list, value)
Append value to list.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| list | integer | inout | allocatabledimension(:) | the list |
| value | integer | in | the value |
Source
Show the code
pure subroutine push_id(list, value)
integer, allocatable, intent(inout) :: list(:) !! the list
integer, intent(in) :: value !! the value
if (allocated(list)) then
list = [list, value]
else
list = [value]
end if
end subroutine push_id