isBase Function

public function isBase(input, base, output) result(error)

Check if the input string is a valid signed integer string of the numbering system with the radix that is defined by the value of the argument base.

This function ignores leading and trailing whitespaces.

This function support numbering system with radix from 2 to 36.

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 when the value of the argument base is smaller than 2 or larger than 36.

Arguments

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

A string.

integer(kind=k_int32), intent(in) :: base

An int32 value that define the radix.

logical, intent(out) :: output

.TRUE. if the input string is a valid signed integer string of the defined numbering system. .FALSE. if the input string is empty(only spaces), 0 length, or is not a valid signed integer string of the defined numbering system.

Return Value logical