fdoc

functionlast_childpureprivate

pure integer function last_child(t, parent)

The last child of node parent, or 0.

Arguments

NameTypeIntentAttributesDescription
ttype(tree_t)in

the conversion

parentintegerin

the node

Result

NameTypeAttributesDescription
last_childinteger

Source

Show the code
pure integer function last_child(t, parent)
    type(tree_t), intent(in) :: t   !! the conversion
    integer, intent(in) :: parent   !! the node

    last_child = 0
    if (size(t%nodes(parent)%kids) > 0) last_child = t%nodes(parent)%kids(size(t%nodes(parent)%kids))
end function last_child

Graphs

Called by