Thomas Plehn
2007-07-24 10:55:16 UTC
Hello,
how does octave handle ambiguities in function calls such as in this example
function y = do_something(x,y,foo)
printf("x = %i, y = %i", x, y);
mult = x * y;
y = mult;
endfunction
how does octave know, which y must be used?
The result of this function is that the parameters x and y are printed,
then multiplicated and then assigned to the return value of the function.
So everything works as it was meant to do.
If one would use any real compiled language, one would expect an
ambiguity error at compile time, but octave doesn't produce an error
neither in the compiling stage nor in the runtime stage.
And the best: Things are done as they were meant to be done.
how does octave handle ambiguities in function calls such as in this example
function y = do_something(x,y,foo)
printf("x = %i, y = %i", x, y);
mult = x * y;
y = mult;
endfunction
how does octave know, which y must be used?
The result of this function is that the parameters x and y are printed,
then multiplicated and then assigned to the return value of the function.
So everything works as it was meant to do.
If one would use any real compiled language, one would expect an
ambiguity error at compile time, but octave doesn't produce an error
neither in the compiling stage nor in the runtime stage.
And the best: Things are done as they were meant to be done.