Initialize file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(file_stl_object), | intent(inout) | :: | self | File STL. |
||
| logical, | intent(in), | optional | :: | skip_destroy | Flag to skip destroy file. |
|
| character(len=*), | intent(in), | optional | :: | file_name | File name. |
|
| logical, | intent(in), | optional | :: | is_ascii | Sentinel to check if file is ASCII. |
elemental subroutine initialize(self, skip_destroy, file_name, is_ascii)
!< Initialize file.
class(file_stl_object), intent(inout) :: self !< File STL.
logical, intent(in), optional :: skip_destroy !< Flag to skip destroy file.
character(*), intent(in), optional :: file_name !< File name.
logical, intent(in), optional :: is_ascii !< Sentinel to check if file is ASCII.
logical :: skip_destroy_ !< Flag to skip destroy file, local variable.
skip_destroy_ = .false. ; if (present(skip_destroy)) skip_destroy_ = skip_destroy
if (.not.skip_destroy_) call self%destroy
if (present(file_name)) self%file_name = trim(adjustl(file_name))
if (present(is_ascii)) self%is_ascii = is_ascii
endsubroutine initialize