adk

10 Reputation

0 Badges

10 years, 311 days

MaplePrimes Activity


These are questions asked by adk

I was under the impression that I could declare the type of the return value from a procedure to be a tuple of two posints as follows:

  foo := proc () :: posint, posint; 12, 13; end proc;

and then use it for multiple assignment as

  i, j := foo();

Of course, I have to set

  kernelopts(assertlevel = 2):

if I want Maple to actually check that foo returns two posints as promised.

All this seems to work as expected, including getting an error message if the returned value has the wrong type.

So, why does Maple IDE claim that this is a syntax error? Is there a difference between the syntax accepted by Maple and Maple IDE, and if so which is correct?

Page 1 of 1