[Issue 1858] std.string find signature is not string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 21 08:15:54 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1858





------- Comment #3 from ddparnell at bigpond.com  2008-02-21 10:15 -------
The example code below works just how I expected the compiler to work. It
displays '10', so I know it found the right 'xfind' function.


import std.stdio;
int function(string, string) lFind;
void main()
{
    lFind = &xfind;
    writefln("%s", lFind("abc", "def"));
}

int xfind(string x, string y) { return 10; }
int xfind(ubyte[] x, ubyte y) { return 20; }
int xfind(char *x, double y) { return 30; }


-- 



More information about the Digitalmars-d-bugs mailing list