# Predefined constructor arguments

**URL:** <https://forum.kirupa.com/t/predefined-constructor-arguments/169982>\
**Category:** Uncategorized\
**Created:** [November 21, 2005, 8:05pm UTC](https://forum.kirupa.com/t/predefined-constructor-arguments/169982 "2005-11-21T20:05:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![EmeniusXp](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@EmeniusXp](https://forum.kirupa.com/u/EmeniusXp)\
**Post date:** [November 21, 2005, 8:05pm UTC](https://forum.kirupa.com/t/predefined-constructor-arguments/169982/1 "2005-11-21T20:05:33Z")

</div>

Is it posible to have predefined arguments in a constructor so if the user doesn’t enter one it takes the default value?

I tried doing it this way:

```auto
class myClass
{
	function myClass(arg:String = "something", arg2:Number=45)
	{
		trace(arg);
	}
}

```

But it says ‘)’ or ‘,’ expected.

I’ve also tried looking in the documentation itself but couldn’t find any hints… and it’s supposed to be posible if you look at the way you create a new array.

thanks in advanced.
