next_composition Function

private pure function next_composition(previous) result(res)

Return the next composition.

If there is no next composition or the first element is -1, then the result is -1 everywhere. This means that the “iterator” is exhausted.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: previous(:)

Return Value integer, (size(previous))


Contents