65 Reputation

One Badge

12 years, 184 days

MaplePrimes Activity

These are questions asked by ianmccr

I have loaded a series of worksheets into a help file using the makehelp command and installed in my toolbox package. Except for one of them, the worksheets appear in the help browser as worksheets instead of help files. Whenever I select one of them, it opens in maple as a worksheet. I would like to control whether a given help file opens as a worksheet or opens as a help.  I have read the helptools help and the help page for makehelp, but have been unable to identify the setting that determines which mode the help file operates in. Please advise what I am missing here.


I found a previous post which contained a worksheet script for creating help, but this example is likely out-of-date. Can anyone provide a similar example for post-2018 help files to save me considerable trial and error.

Maple programming is certainly full of pitfalls for the unwary and the inexperienced as my recent difficulty demonstrates.

I have encountered disconcerting behaviour in the way the Maple type system treats tables and names as a result of last name evaluation.  In my case, it created a rather difficult debugging session in a procedure I was writing.

Specifically, in a procedure where a defined table is an argument, within the procedure the table satisfies the type test for a table, as well as for a name and a symbol. In retrospect, I realize that this makes sense when last name evaluation is in play, but I don't recall any mention of this particular side effect in the help files describing parameter processing or tables.  (or I forgot)
Once identified the problem, I found two fixes:

1) test for a table before I testing for a name(symbol).
2) use eval(T) as the argument when calling the procedure.  

I feel a bit uneasy about the first approach because I'm not certain there isn't some pitfall writing a procedure where the order of execution changes the outcome. Is the second approach the best way (as a rule of thumb) to feed a table into a procedure.

A somewhat artifical worksheet is attached to illustrate the problem and these approaches.


I am using a maple workbook to develop, test, and install a package I am developing.  Several days ago, I noticed that the workbook was not updating the package to reflect the most recent versions of my source code (.mpl). I initially assumed the problem caused by some unintentional change I made to the file, but in the end I found there is a general problem with the URIs in the maple workbook. Everything worked in 2019.1 and I hadn't made any changes after I updated to 2019.2.1.

To confirm the problem, I created a new directory(in fully updated Windows 10 ) and copied my source file into the directory. Then I created a worksheet in maple and saved it into the directory as xx.mw. Using the Navigator panel I then saved the worksheet as a workbook creating xx.maple in the directory.  I then tried to attach the mpl file to the workbook.  In the Navigator menu, the item "attach a file" is unavailable( greyed out).  This is also the case in any of the other earlier workbooks I have created.  I have confirmed the problem is not affecting worksheets because I was able to read my mpl file into a worksheet and load the module using a with(modulename) command.

Please advise.


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?

1 2 3 Page 1 of 3