Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fson_value), | pointer | :: | this | |||
type(fson_value), | pointer | :: | member |
subroutine fson_value_add(this, member)
type(fson_value), pointer :: this, member, p
! associate the parent
member % parent => this
! add to linked list
if (associated(this % children)) then
! get to the tail of the linked list
p => this % children
do while (associated(p % next))
p => p % next
end do
p % next => member
else
this % children => member
end if
end subroutine fson_value_add