assumeIsOdd Function

public function assumeIsOdd(input, output) result(error)

Check the input string to see if it holds an odd value with the assumption that the string is a valid decimal integer string.

This function ignores leading and trailing whitespaces.

This function returns a logical value of .TRUE. on error. Otherwise, a logical value of .FALSE. is returned.

This function considers an error to has occurred if the input string is empty(only spaces) or is 0 length.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: input

A string.

logical, intent(out) :: output

.TRUE. if the rightmost character(exclude trailing spaces) is an odd value, or otherwise, .FALSE..

Return Value logical