Re: Passing array as an function argument.

2017-09-11 Thread Vino.B via Digitalmars-d-learn
On Monday, 11 September 2017 at 12:44:00 UTC, wobbles wrote: On Monday, 11 September 2017 at 12:20:08 UTC, Vino.B wrote: On Monday, 11 September 2017 at 12:03:32 UTC, wobbles wrote: On Monday, 11 September 2017 at 11:58:18 UTC, Vino.B wrote: [...] The type returned from Test1() is a

Re: Passing array as an function argument.

2017-09-11 Thread wobbles via Digitalmars-d-learn
On Monday, 11 September 2017 at 12:20:08 UTC, Vino.B wrote: On Monday, 11 September 2017 at 12:03:32 UTC, wobbles wrote: On Monday, 11 September 2017 at 11:58:18 UTC, Vino.B wrote: [...] The type returned from Test1() is a `RangeT!(Array!string)`. This is due to the `[]` on the end of

Re: Passing array as an function argument.

2017-09-11 Thread Vino.B via Digitalmars-d-learn
On Monday, 11 September 2017 at 12:03:32 UTC, wobbles wrote: On Monday, 11 September 2017 at 11:58:18 UTC, Vino.B wrote: Hi All, Can some one help me on how to pass a container array as a function argument , the below code throws an error, Error: Error: function T3.Test2 (Array!string t1)

Re: Passing array as an function argument.

2017-09-11 Thread wobbles via Digitalmars-d-learn
On Monday, 11 September 2017 at 11:58:18 UTC, Vino.B wrote: Hi All, Can some one help me on how to pass a container array as a function argument , the below code throws an error, Error: Error: function T3.Test2 (Array!string t1) is not callable using argument types (RangeT!(Array!string))

Passing array as an function argument.

2017-09-11 Thread Vino.B via Digitalmars-d-learn
Hi All, Can some one help me on how to pass a container array as a function argument , the below code throws an error, Error: Error: function T3.Test2 (Array!string t1) is not callable using argument types (RangeT!(Array!string)) import std.stdio: writeln; import std.container; auto