class StupidHashTable { array(mixed) tab; int size;
static void create(int size) { this_program::size = size; tab = allocate(size); }
void insert(mixed x) { int hval; if (intp(x)) hval = x; else hval = hash(x); tab[hval % size] = x; } }
StupidHashTable(4)->insert(-17);
/ Henrik Grubbström (Lysator)
Previous text:
2003-01-15 17:51: Subject: Re: signed integer division
On Wed, Jan 15, 2003 at 05:10:04PM +0100, Niels Möller () @ Pike (-) developers forum wrote:
Hmm, I hope this is exported, or that Martin reads the lyskom conference.
both, i am reading the conference via the exported list :-) i do understand the thing as far as math goes, what i am looking for is an example of a practical application that would break if you round towards 0.
greetings, martin.
/ Brevbäraren