Determine if array contains only tables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array), | intent(inout) | :: | array |
TOML value to visit |
Array contains only tables
function is_array_of_tables(array) result(only_tables) !> TOML value to visit class(toml_array), intent(inout) :: array !> Array contains only tables logical :: only_tables class(toml_value), pointer :: ptr integer :: i, n n = len(array) only_tables = n > 0 do i = 1, n call array%get(i, ptr) select type(ptr) type is(toml_table) cycle class default only_tables = .false. exit end select end do end function is_array_of_tables