cast_to_array Function

public function cast_to_array(ptr) result(array)

Cast an abstract TOML value to a TOML array

Arguments

Type IntentOptional Attributes Name
class(toml_value), intent(in), target :: ptr

TOML value to be casted

Return Value type(toml_array), pointer

TOML array view, nullified if the value is not an array


Source Code

function cast_to_array(ptr) result(array)
   !> TOML value to be casted
   class(toml_value), intent(in), target :: ptr
   !> TOML array view, nullified if the value is not an array
   type(toml_array), pointer :: array

   nullify(array)
   select type(ptr)
   type is(toml_array)
      array => ptr
   end select
end function cast_to_array