On 12 Oct 2006 04:40:32 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> 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.
Um... isn't 'p' the list in question? There is only one variable used for the calculation of the return value (yes, it's a maximum), and that's 'x'. -- # p.d. -- http://mail.python.org/mailman/listinfo/python-list