Question: questions on mint and differences from maplemint

I use the command line mint  since all my code in .mpl files.

First question:

I noticed mint complains that module name is global, for proc inside the module itself, when the name is used as type of a local variable. But maplemint does not complain. Here is an example

A:=module()
   local B:=module()
         option object;
         export n::integer:=1;
   end module;

   export foo:=proc()
      local a::A:-B;  #mint complains that A is global not declared!
      a:=Object(A:-B);
      a:-n:=2;
   end proc;
end module;

running mint -i 2 A.mpl gives

These names were used as global names but were not declared:  A

But A is the module name where the whole code is sitting inside it?  To fix this, I have to add

A:=module()
   local B:=module()
         option object;
         export n::integer:=1;
   end module;

   export foo:=proc()
      global A;  ###################add this
      local a::A:-B;
      a:=Object(A:-B);
      a:-n:=2;
   end proc;
end module;

And now the message/warning is gone. But the above looks really strange.  maplemint does not complain about global A:

But notice that maplemint gives waring that n is never used but mint do not. Another difference!

Which is right about the global name message?

Second question is: I do not understand the message

     These local variables were assigned a value, but otherwise unused:  B

which both mint and maplemint give,

What does it mean B is not used?? I used it to make object a inside proc foo().

What would one do to get rid of this message?

Final comment:

I find many message come out that are not real problems at all. For example, if I declare local variable and use it in equation, as symbol, mint complains that the variable was not assigned a value. Here is an example

foo:=proc()
   local x,eq;
   eq := x^2;
   return eq;
end proc;

now maplemint(foo) gives

Procedure foo()
  These local variables were used but never assigned a value:  x

I know there are ways to filter out these messages. But I am afraid if I do that, I will filter out a message that indicates a real problem?

According to help   -i 2 shows Display severe and serious errors (default)

if I use -i 1, then these message do not show. What do others use?  Level 1 or 2? If I use level 3, then more strange messages show which I do not understand at all how to remove. Such as

These parameters or local variables are also system defined names:
      thismodule
  These names are special to Maple:
      thismodule

So I stick to level 2 for now. but 90% of the messages I get are not real errors at all.

Please Wait...