functionis_intrinsicpure
pure logical function is_intrinsic(name)
True if name, in lowercase, is one of the names.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| name | character(len=*) | in | the name |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| is_intrinsic | logical |
Source
Show the code
pure logical function is_intrinsic(name)
character(len=*), intent(in) :: name !! the name
integer :: low, high, middle
is_intrinsic = .false.
if (len(name) > NAME_LEN) return
low = 1
high = size(NAMES)
do while (low <= high)
middle = (low + high)/2
if (name == NAMES(middle)) then
is_intrinsic = .true.
return
else if (lgt(name, NAMES(middle))) then
low = middle + 1
else
high = middle - 1
end if
end do
end function is_intrinsic