Standard Forth versus Python: a case study

Paul Rubin http
Thu Oct 12 13:40:32 CEST 2006


Paul Rubin <http://phr.cx@NOSPAM.invalid> 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.



More information about the Python-list mailing list