Branch: Tag:

1998-05-09

1998-05-09 22:13:58 by Fredrik Noring <noring@nocrew.org>

filter -> where.

Rev: lib/modules/ADT.pmod/Table.pmod:1.5

1:   // Table.pmod by Fredrik Noring, 1998 - // $Id: Table.pmod,v 1.4 1998/05/09 21:30:22 noring Exp $ + // $Id: Table.pmod,v 1.5 1998/05/09 22:13:58 noring Exp $      #define TABLE_ERR(msg) throw(({ "(Table) "+msg+"\n", backtrace() }))   
153:    return select(@remap(fields) - remap(cs, 1));    }    -  object filter(function f, array(int|string)|int|string cs, mixed ... args) +  object where(function f, array(int|string)|int|string cs, mixed ... args)    {    array t = ({});    cs = remap(arrayp(cs)?cs:({ cs }));
169:    return this_object();       if(functionp(f)) { +  if(!arrayp(args[0])) +  args[0] = ({ args[0] });    f = mkmapping(args[0], allocate(sizeof(args[0]), f));    args = args[1..];    }