Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

alias

25 views
Skip to first unread message

Jerome BENOIT

unread,
Apr 27, 2013, 8:33:54 AM4/27/13
to
Hello Maple Fans,

is there a way to show `alias' ?

Thanks,
Jerome

Joe Riel

unread,
May 10, 2013, 1:39:04 AM5/10/13
to
Jerome BENOIT <g629...@rezozer.net> writes:

> Hello Maple Fans,
>
> is there a way to show `alias' ?

Do you mean a way to display the current aliases?
I don't believe one exists, but here is a quick hack
that attempts to do so.

showaliases := proc()
local addrs, eq, eqs, x;
# copy global table of addresses mapping aliased to alias
addrs := op(2,op(alias:-ContentAddressToGlobalAddress));
# remove all aliases
alias(seq(x=x, x=[indices(alias:-GlobalToContent,'nolist')]));
eqs := seq(pointto(rhs(eq)) = pointto(lhs(eq)), eq = addrs);
# display the aliases
print(eqs);
# restore the aliases
alias(eqs);
NULL;
end proc:

(**) alias(f=f(x), df=diff(f(x),x));
f, df

(**) diff(f,x);
df

(**) showaliases();
d
f = f(x), df = -- f(x)
dx

(**) diff(f,x);
df

--
Joe Riel
0 new messages