Question: How do I pretty print the results from an installed package using an exported local name

linkedlist.zip

I am having a problem understanding how to pretty print the results of a procedure incorporated into a module installed as a package using the maple workbook(.maple).  In an effort to understand how this should be done, I installed the LinkedListPackage from the example code using a maple workbook to see if the package works as shown in the help files. The results from this exercise confirmed the problem I am having with a module I am creating. Specifically, as shown in the help file, I assigned the exported name “nil” to L; ie. L := nil; Note that the result is L:= linkedlist:-nil not L:= nil.  Furthermore when I create a linked list the results are as shown below:  

L := ``(1, linkedlist:-nil)
L := ``(2, ``(1, linkedlist:-nil))
L := ``(3, ``(2, ``(1, linkedlist:-nil)))
L := ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))
L := ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil)))))
L := ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))))
L := ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil)))))))
L := ``(8, ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))))))
L := ``(9, ``(8, ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil)))))))))
L := ``(10, ``(9, ``(8, ``(7, ``(6, ``(5, ``(4, ``(3, ``(2, ``(1, linkedlist:-nil))))))))))

I realized that nil is an exported local variable which is being reflected in how it presents in the worksheet, but in an expression of any complexity presenting exported local names in this way makes the expression unreadable. I have been combing help looking for a clue as to how the results from the package can be pretty-printed without a fully-qualified name. Can you suggest how I should proceed.

My other question concerns the macro command which is used in the example code to format the pairs.  As written in the help file, the macro command is intended to replace the name _PAIR with a space.  However, it seems that the macro facility now replaces _PAIR with name quotes instead of a space. Has the macro facility changed since the example was written?

Please Wait...