get_tomlf_version Subroutine

public subroutine get_tomlf_version(major, minor, patch, string)

Getter function to retrieve TOML-Fortran version

Arguments

Type IntentOptional Attributes Name
integer, intent(out), optional :: major

Major version number of the TOML-Fortran version

integer, intent(out), optional :: minor

Minor version number of the TOML-Fortran version

integer, intent(out), optional :: patch

Patch version number of the TOML-Fortran version

character(len=:), intent(out), optional, allocatable :: string

String representation of the TOML-Fortran version


Source Code

subroutine get_tomlf_version(major, minor, patch, string)

   !> Major version number of the TOML-Fortran version
   integer, intent(out), optional :: major

   !> Minor version number of the TOML-Fortran version
   integer, intent(out), optional :: minor

   !> Patch version number of the TOML-Fortran version
   integer, intent(out), optional :: patch

   !> String representation of the TOML-Fortran version
   character(len=:), allocatable, intent(out), optional :: string

   if (present(major)) then
      major = tomlf_major
   end if
   if (present(minor)) then
      minor = tomlf_minor
   end if
   if (present(patch)) then
      patch = tomlf_patch
   end if
   if (present(string)) then
      string = tomlf_version_string
   end if

end subroutine get_tomlf_version