Re: Arguments of function as an array.

2018-04-26 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, April 26, 2018 21:28:27 Jonathan via Digitalmars-d-learn wrote: > Is there a way in D to take past arguments as an array? A like a > normal Variadic function. All the arguments should be of the > same type just as an array. > > Basically I want to allow a function like this to be

Re: Arguments of function as an array.

2018-04-26 Thread ag0aep6g via Digitalmars-d-learn
On 04/26/2018 11:28 PM, Jonathan wrote: Is there a way in D to take past arguments as an array?  A like a normal Variadic function.  All the arguments should be of the same type just as an array. Basically I want to allow a function like this to be called without square brackets. void

Arguments of function as an array.

2018-04-26 Thread Jonathan via Digitalmars-d-learn
Is there a way in D to take past arguments as an array? A like a normal Variadic function. All the arguments should be of the same type just as an array. Basically I want to allow a function like this to be called without square brackets. void fun(int[] intArray) { //... } void main()