Set option data value (scalar).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(option), | intent(inout) | :: | self | Option data. |
||
class(*), | intent(in) | :: | val | Value. |
pure subroutine set_option(self, val)
!< Set option data value (scalar).
class(option), intent(inout) :: self !< Option data.
class(*), intent(in) :: val !< Value.
select type(val)
#ifdef _R16P
type is(real(R16P))
self%ovals = val
#endif
type is(real(R8P))
self%ovals = val
type is(real(R4P))
self%ovals = val
type is(integer(I8P))
self%ovals = val
type is(integer(I4P))
self%ovals = val
type is(integer(I2P))
self%ovals = val
type is(integer(I1P))
self%ovals = val
type is(logical)
self%ovals = trim(str(n=val))
type is(character(*))
self%ovals = val
endselect
endsubroutine set_option