Question: Why is eval needed to call procedure in package when its name is first assigned to variable?

This works

ode := diff(y(x),x)=a0+a1*y(x)+a2*y(x)^2+a3*y(x)^3;

But this does not

ode := diff(y(x),x)=a0+a1*y(x)+a2*y(x)^2+a3*y(x)^3;

Then I found this made it work


So I am guessing what happens is this: doing DEtools:-name_of_solver Maple first searched for a proc called name_of_solver inside DEtools package, and found none. So it does not work.

But adding eval first, then name_of_solver is evaluated and replaced by abelsol and after that the call is made, and it then finds this proc inside the DEtools package.

But my question is, why is eval needed here?

Is it not automatically happens that a variable is replaced by its value? So I expected DEtools:-name_of_solver to automatically become DEtools:-abelsol and only then the call is made.

Why the rule of evaluation is different in this case?

Please Wait...