public function fnStringCompare(firstString, secondString, output) result(error)
Compare two strings as decimal integers. This function evaluates both, negative and positive values. There isn't a maximum length for the strings. Nonetheless, the strings can't be empty.
This function ignores leading and trailing whitespaces.
This function disregards leading zeroes.
This function return an int32 value of 0 if it did not encounter an error during the comparison process. Otherwise, it will return a true error code.
Error code:
0 - no error
1 - empty string firstString
(spaces only or 0 length)
2 - empty string secondString
(spaces only or 0 length)
3 - bad format firstString
4 - bad format secondString
Arguments
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | firstString | A string to be compared to the string | ||
character(len=*), | intent(in) | :: | secondString | A string to be compared to the string | ||
integer(kind=k_int32), | intent(out) | :: | output | An int32 value of 1 if the |