73 Reputation

5 Badges

18 years, 135 days

MaplePrimes Activity

These are questions asked by IanLisle

The help page for ?error says the following:

  • A numbered parameter of the form %n displays the nth msgParam in lprint notation.

However this is not literally true if %n happens to refer to a Maple object.  When a Maple object is lprint-ed, it looks for the object's ?ModuleDeconstruct method and uses that.  But in fact if M is an object, an error call like

error "invalid input: object %1 is wrong", M

displays M using its module shell

   Error, invalid input: object  module() export.... local... option object; end module  is wrong.

This is ugly and seems to contradict the ?error help page.  Why isn't the ModuleDeconstruct method of M invoked?  It is one of the few circumstances where an object is displayed "raw" without using either its ModulePrint or ModuleDeconstruct methods.  And can anyone suggest a workaround?

Sorry, don't have access to Maple 18, the above is for my M17.




Hi all,

We're programming with Maple objects, and would like to have a Maple object that is appliable (i.e. acts as an operator).  We're really after partial differential operator (PDO) objects, but I give a simpler example below.  The problem is this: the ?ModuleApply proc needs to be non-static (so that each object has its own ?ModuleApply), and it may want to refer to the object instance, via ?thismodule.  Code like this works great when it is typed at the command line or read in from .mpl file, but it barfs as soon as saved to a .mla.  Why is that?  And is there an easy fix / workaround?


Here is an example worksheet, that creates a basic "compute mod p" object


The issue seems to be that, for code typed at command line, ?thismodule is resolved when I would expect, i.e. in the instance object; but saving to the .mla seems to cause ?thismodule to be resolved then-and-there, which means it resolves to the prototype object.  For this particular case there is an easy workaround, but we really want to refer to ?thismodule if possible.  Is there a way to do that?

BTW I'm running Maple 17.02 (sorry don't have access to 18 yet).

Ian and Tracy

Is there a bug in the CodeTools:-EncodeName / DecodeName pair?

Consider the following minimal example:

M := module() option package; export f; f := proc() end proc; end module;

The EncodeName gives answer:

_Inert_ASSIGNEDLOCALNAME("f", "PROC", 0, _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected")))))

But applying...

Page 1 of 1