cast_to_table Function

public function cast_to_table(ptr) result(table)

Cast an abstract TOML value to a TOML table

Arguments

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

TOML value to be casted

Return Value type(toml_table), pointer

TOML table view, nullified if the value is not a table


Source Code

function cast_to_table(ptr) result(table)
   !> TOML value to be casted
   class(toml_value), intent(in), target :: ptr
   !> TOML table view, nullified if the value is not a table
   type(toml_table), pointer :: table

   nullify(table)
   select type(ptr)
   type is(toml_table)
      table => ptr
   end select
end function cast_to_table