returning different types via function

seany seany at uni-bonn.de
Tue Nov 19 11:15:09 PST 2013


Consider this:

I have a function FUNC, it takes a string array, and does 
something with it, and retruns the same. Implemented based on a 
previous thread, here is what i have

string[] FUNC (ref string[] ZZ)
{
/*
do something
*/
}

and the calling is, ZZ = FUNC(ZZ)

Now, I want, should the function be not successful in doing what 
it intends to do, to return a boolean value of false, to ZZ, un 
fortunately ZZ is already a string[] (so i want liek a C style 
fopen -like function, that , although called with the syntax: 
file *f = fopen(balh, "bla"); can set f to be false)

Is this possible in D?



More information about the Digitalmars-d-learn mailing list