Sets 0D (scalar) value equal to 0D (scalar) default.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(*), | intent(out) | :: | value |
Value to return |
||
| class(*), | intent(in) | :: | default |
Default value to return in case label is not found |
impure subroutine parser_obj_AssignDefault0D(value,default) !> Sets 0D (scalar) value equal to 0D (scalar) default. implicit none class(*), intent(out) :: value !! Value to return class(*), intent(in) :: default !! Default value to return in case label is not found ! Work variables logical :: ok ok=.true. select type(default) type is (logical) select type(value) type is (logical) value=default class default ok=.false. end select type is (real(leapDP)) select type(value) type is (real(leapDP)) value=default class default ok=.false. end select type is (real(leapSP)) select type(value) type is (real(leapSP)) value=default class default ok=.false. end select type is (integer(leapI4)) select type(value) type is (integer(leapI4)) value=default class default ok=.false. end select type is (integer(leapI8)) select type(value) type is (integer(leapI8)) value=default class default ok=.false. end select type is (character(len=*)) select type(value) type is (character(len=*)) value=default class default ok=.false. end select class default stop "Error in Parser: unknown default variable type" end select if (.not.ok) then stop "Error in Parser: default and value must be of the same type" end if return end subroutine parser_obj_AssignDefault0D