Passing function parameters in a non-sequential fashon
Consider the function below:
function personal(Name:String,age:int,city:String):void
{
trace(Name+" is "+age+ " years old and lives in "+city+ ".")
}
The parameters can only(???) be passed in the order they are declared in the function as shown below.
personal("John",40,"London"0)
If the order is changed as: personal("London",John", 40), there will obviously be a type related error (position 2 parameter is an integer).
Is there a way of passing function parameters as: personal(city="London",Name=John",age= 40)?
That way one does not have to worry about the 'order' in which the parameters are passed.