Question: How can I prevent an expression from being evaluated in substitution?

I encounter a situation demonstrated in the following piece of codes:

X := `<,>`(1, 2, 3);
T := proc () K[1] end proc;
S := proc (X) subs(K = uneval('X'), eval(T)) end proc;
The output is:
                                [ ]
                           X := [2]
                                [ ]

                   T := proc() K[1] end proc

    S := proc(X) subs(K = uneval('X'), eval(T)) end proc

 proc() 'Vector(3, [...], datatype = anything)'[1] end proc

How can I prevent X from being evaluated into a Vector in the substitution in S?

I really expects to get

proc() 'X'[1] end proc

as output of S(X).





If I directly run subs(K = uneval('X'), eval(T)) in maple document, I can get the expected result:

proc () 'X'[1] end proc

I really doubt if it is a bug.

Please Wait...