TheFlyingDutchman <zzbba...@aol.com> writes:
> With Tiny C on my system, your code does not cause maximum to give an
> incorrect value, or to blow up:
>
> int maximum(int a, int b)
> {
>   printf("entering maximum %d %d\n",a,b);
>   if ( a > b )
>     return a;
>   else
>     return b;
> }

What did printf show as "b" when you ran it?  If that code worked at
all, it was by accident.  Try changing the name "maximum" to "minimum"
and change the ">" to "<", compile the same program, and see if you
still get a correct value.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to