# How can define a function that accepts colon \`a:b\` inputs for integer ranges

**URL:** <https://fortran-lang.discourse.group/t/how-can-define-a-function-that-accepts-colon-a-b-inputs-for-integer-ranges/3575>\
**Category:** Help\
**Created:** [May 27, 2022, 9:29pm UTC](https://fortran-lang.discourse.group/t/how-can-define-a-function-that-accepts-colon-a-b-inputs-for-integer-ranges/3575 "2022-05-27T21:29:13Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![FortranFan](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FortranFan](https://fortran-lang.discourse.group/u/FortranFan)\
**Post date:** [May 27, 2022, 10:27pm UTC](https://fortran-lang.discourse.group/t/how-can-define-a-function-that-accepts-colon-a-b-inputs-for-integer-ranges/3575/3 "2022-05-27T22:27:59Z")

</div>

> [@johnalx](#):
>
> Is it possible to specify a `a:b` type of argument for a function?

No, not directly at least using the standard language facilities. See this [**comment**](https://fortran-lang.discourse.group/t/high-performance-fortran-hpf-history-and-lessons/367/22) at another thread. As Fortranners seek further abstraction in their codes, having such a flexibility will be useful and it will be good if a future Generics capability builds on it but that is all is quite a while away.

In the mean time, if you share what you’re trying to achieve, readers may be able to suggest other possible workarounds.

---

_[View the full topic](https://fortran-lang.discourse.group/t/how-can-define-a-function-that-accepts-colon-a-b-inputs-for-integer-ranges/3575)._
