diff options
Diffstat (limited to 'captain/response.f90')
-rw-r--r-- | captain/response.f90 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/captain/response.f90 b/captain/response.f90 index 3526766..1c7a0b5 100644 --- a/captain/response.f90 +++ b/captain/response.f90 @@ -45,6 +45,7 @@ implicit none procedure :: destroy => request_destroy procedure :: last_component => request_last_component procedure :: path_component => request_component + procedure :: path_component_int => request_component_int procedure :: component => request_component_func end type request @@ -158,6 +159,25 @@ contains end subroutine request_component + + function request_component_int(self, i) result(res) + implicit none + + class(request) :: self + integer, intent(in)::i + integer :: res + + character(24)::restext + + restext = " " + + call self%path_component(i, restext) + + read(restext, '(I16)') res + + end function request_component_int + + function request_component_func(self, i) result(res) implicit none |