# An \`eye\` function that accepts the default integer and another integer kind simultaneously

**URL:** <https://fortran-lang.discourse.group/t/an-eye-function-that-accepts-the-default-integer-and-another-integer-kind-simultaneously/2243>\
**Category:** Help\
**Created:** [November 8, 2021, 4:15pm UTC](https://fortran-lang.discourse.group/t/an-eye-function-that-accepts-the-default-integer-and-another-integer-kind-simultaneously/2243 "2021-11-08T16:15:19Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![zaikunzhang](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/zaikunzhang/32/785_2.png) [@zaikunzhang](https://fortran-lang.discourse.group/u/zaikunzhang)\
**Post date:** [November 8, 2021, 11:33pm UTC](https://fortran-lang.discourse.group/t/an-eye-function-that-accepts-the-default-integer-and-another-integer-kind-simultaneously/2243/14 "2021-11-08T23:33:38Z")

</div>

Thank you @FortranFan for the detailed solution and explanation!

> [@Faster string to double](https://fortran-lang.discourse.group/t/faster-string-to-double/2208/29):
>
> ```auto
> elemental subroutine str2r_rk3( r, str )
> character(len=*), intent(in) :: str
> real(real_kinds(3)), intent(out) :: r
> ! Local variables
> integer, parameter :: WP = real_kinds(3)
> include 'str2r.i90'
> end subroutine
> 
> ```

Does this work if on the user’s platform `real_kind` has only two elements rather than three? Or does the standard ensure that `size(real_kind) == 3`?

A minor side note is that `real_kinds` and `integer_kinds` are F2008 but I hope to have an implementation compatible with F2003.

---

_[View the full topic](https://fortran-lang.discourse.group/t/an-eye-function-that-accepts-the-default-integer-and-another-integer-kind-simultaneously/2243)._
