Standard Forth versus Python: a case study

Fredrik Lundh fredrik at pythonware.com
Thu Oct 12 08:38:37 EDT 2006


idknow at gmail.com wrote:

> hi Paul; well when this was a stats-class assignment (back when pascal
> was popular :) i just stepped through the vector and compared it
>
> (pseudo-code)
>
> ptr p = [with values].
>
> fun median {
> var x = 0.
>  while( *p++) {
>    if( (*p) > x) x = *p.
>  }
>  return x.
> }
>
> of course, pascal is more verbose but that's median()

that's a rather unusual definition of median, though.

</F> 






More information about the Python-list mailing list