Martin Rubey wrote:
> I just did a quick check who uses isExpt with two arguments:
>
> I think it would be best to remove the two argument form of isExpt entirely,
> or
>
> 1) leave it as it was and clarify the documentation:
>
> isExpt:(%,OP) -> Union(Record(var:K,exponent:Z),"failed")
> ++ isExpt(p,op) returns \spad{[x, n]} if \spad{p = x**n}
> ++ and \spad{n <> 0} and \spad{x = op(a1,a2,...)}.
>
> 2) and do the check for the number of arguments outside.
>
So, basically you say that we should check number of argument at place
of use. I see another possibility: add third argument to isExpt, giving
expected number of arguments.
My first impression was that there were several places where we expect
exactly one argument, but as you noticed there are only few of them.
> The usage with second argument being a symbol (in manip.spad) looks
> particularly fishy to me, and I think it should be removed in any case.
>
We clearly expect 2 arguments there, but ATM I do not have a testcase
which would use this code path.
--
Waldek Hebisch
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---