# Function Parameters

**URL:** <https://forum.servoy.com/t/function-parameters/9909>\
**Category:** Classic Servoy\
**Created:** [November 21, 2008, 12:07am UTC](https://forum.servoy.com/t/function-parameters/9909 "2008-11-21T00:07:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yeroc](https://avatars.discourse-cdn.com/v4/letter/y/65b543/32.png) [@Yeroc](https://forum.servoy.com/u/Yeroc)\
**Post date:** [November 21, 2008, 12:07am UTC](https://forum.servoy.com/t/function-parameters/9909/1 "2008-11-21T00:07:12Z")

</div>

When defining a function in my form I wanted to specify the parameters like so:

```auto
function myFunction(id, pageCount)
{
...
}

```

But Servoy (v4.1.0 rc1 at least) doesn’t seem to like this syntax and “eats” the parameters as soon as I save(!). Any ideas why this syntax isn’t allowed? It much less verbose and cleaner than (IMO):

```auto
function myFunction()
{
  var id = arguments[0]
  var pageCount = arguments[1]
...
}

```

As far as I can tell Rhino (the javascript implementation used by Servoy) supports this syntax.

Is this a bug?

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [November 21, 2008, 7:01am UTC](https://forum.servoy.com/t/function-parameters/9909/2 "2008-11-21T07:01:08Z")

</div>

Hi Yeroc,

> Yeroc:  
> As far as I can tell Rhino (the javascript implementation used by Servoy) supports this syntax.
> 
> Is this a bug?

It’s a ‘feature’ ![;)]( "Wink")  
It’s the way Servoy always worked but I understand that they will support it in some future version.  
So it’s on the list.

Right now you can use function parameters with functions INSIDE your methods but the methods themselves you need to use the arguments array approach.

Hope this helps
