Passing Function as an argument to another Function

rikki cattermole rikki at cattermole.co.nz
Mon Dec 4 10:46:03 UTC 2017


On 04/12/2017 10:36 AM, Vino wrote:
> Hi Rikki,
> 
>    Thank you very much, I tired the above code and it is working, so 
> another help on the same topic.
> IF my function (First) of below type when who do we define the Mid function
> 
> Array!(Tuple!(string, string))  First(string Ftext)
> 
> Tried the below  but no luck
> void mid(Array!(Tuple!(string, string)) function(string) func, string 
> mtext) {
>       func(mtext);
> }

Looks valid.

mid(&First, "Str");

So error + full source please.


More information about the Digitalmars-d-learn mailing list