Question: Function Overloading

I have written a procedure to overload a new "Subs" function. It uses a seq of equations as its first argument followed by the object to act upon (yes, it is to have subs functionality on these objects). I find the overloading works when I have just one equation in the argument list, but with more than one it never calls any of the procedures. The code worked with multiple equations before I overloaded it (i.e. the first proc was verified by itself). FWIW the objects (elemt or bm) are records. Here is the code:

Subs:=overload( [
proc(eqn::seq(equation),elemt::Element) option overload;
description "subs command for Elements or BeamLines";
local qs:=[exports(elemt)];
print("Subs Element"); # so we know we got here
return Record(seq(qs[i]=:-subs(eqn,elemt[qs[i]]),i=1..numelems(qs)));
end proc,
proc(eqn::seq(equation),bm::Beam) option overload;
description "subs command for Beams";
local qs:=[exports(bm)];
print("Subs Beam"); #... or got here
return Record(seq(qs[i]=:-subs(eqn,bm[qs[i]]),i=1..numelems(qs)));
end proc
] );

Is overload() known to fail with seq qualifiers?

TIA,

Mac Dude

Please Wait...