# Range Argument

**URL:** <https://chapel.discourse.group/t/range-argument/30967>\
**Category:** Users\
**Created:** [February 23, 2024, 10:09am UTC](https://chapel.discourse.group/t/range-argument/30967 "2024-02-23T10:09:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)\
**Post date:** [February 23, 2024, 10:09am UTC](https://chapel.discourse.group/t/range-argument/30967/1 "2024-02-23T10:09:04Z")

</div>

How does one declare an argument to be a range that can be passed a range that can be any strikeKind, i.e.

```chapel
param K = .???
const S = ???
const R = L .. M;
const R = L .. M by K;
const R = L .. M by S;

```

---

<div class="post-metadata">

**Author:** ![vass](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/vass/32/692_2.png) [@vass](https://chapel.discourse.group/u/vass)\
**Post date:** [February 23, 2024, 4:51pm UTC](https://chapel.discourse.group/t/range-argument/30967/2 "2024-02-23T16:51:59Z")

</div>

Hello,

A formal that accepts any `strideKind` looks like this:

```Chapel
proc p(arg:range(strides=?, bounds=boundKind.both)) { ... }

```

The `bounds` specification ensures you can't pass unbounded ranges like `L..`.

For a fully-generic range argument, it is simply:

```Chapel
proc p(arg:range(?)) {...}

```

Vass
