Like this:
Pike v7.4 release 20 running Hilfe v3.5 (Incremental Pike Frontend)
class foo(string msg) {
int `>(mixed x) { return 0; } int `==(mixed x) { return 1; } string _sprintf(int mode, mapping options) { return mode=='O' && sprintf("%O(%O)", this_program, msg); } };
sort( ({ foo("one"), foo("two"), foo("three") }) );
(1) Result: ({ /* 3 elements */ HilfeInput()->foo("three"), HilfeInput()->foo("one"), HilfeInput()->foo("two") })
pike-devel@lists.lysator.liu.se