Paul Rubin wrote: > Paul Rubin <http://[EMAIL PROTECTED]> writes: > > > fun median { > > > var x = 0. > > > while( *p++) { > > > if( (*p) > x) x = *p. > > > } > > > return x. > > > } > > > > I count two variables, p and x. > > Also, that finds the maximum, not the median. I had stopped examining > it after seeing it used more than one variable.
oops, i apologise, the > should be < that's just a typo. As for your quoting, you cut off the global var line and miscounted; p is a global or from the caller of median() also, i plead `too early in the morning to code properly' :) clearly, i've forgotten the definition of the median of a list. to that i plead faulty memory. my apologises for coding at a bad hour. -- http://mail.python.org/mailman/listinfo/python-list