Hi,

Can you help me in how to return multiple values from a function, the below code is throwing an error as below

Program:
import std.stdio: writeln;
import std.typecons: tuple, Tuple;

Tuple!(int, string[]) Params () {
int Test1;
string[] Path;
Test1 = 1;
Path = ["C:\\Temp\\TEAM1\\BACKUP", "C:\\Temp\\TEAM2\\ARCHIVE"];
return Test1;
return Path;
}

void main (){
int Test1;
string[] Path;
Params;
writeln(Test1);
writeln(Path);
}

Error:
TEx1.d(9): Error: cannot implicitly convert expression Test1 of type int to Tuple!(int, string[]) TEx1.d(10): Error: cannot implicitly convert expression Path of type string[] to Tuple!(int, string[])

From,
Vino.B

Reply via email to