Next: Question 4: I Up: Some Maple Questions and Previous: Question 2: I

Question 3: Can I see the Maple source code? How?

Answer: Maple has a kernel written in C and a library written in the Maple programming language. The kernel is not available to the public, but the library is. To see a Maple Library procedure, e.g. gcd, you use the print command.


> print(gcd);
proc(aa,bb,cofa,cofb) ... end
To avoid the problem of information explosion procedures are not completely printed at Maple's default settings as shown above. To force full printing you need only reset one of the interface variables.

> interface(verboseproc=2);
> print(gcd);
proc(aa,bb,cofa,cofb)
local a,b,inda,indb,inds,ta,tb,res,x,GCD,II,Z;
options `Copyright 1990 by the University of Waterloo`;

      ....omitted about 100 lines to save space.....

end
Printing the code in this way does not include any of the programmer's comments. If you want a separate copy of the library source code, with comments, it is available from the distributors for a set price. Some Maple procedures are coded completely within the kernel. Their code is not available. If you try to print them you see the following type of special procedure body.

> print(diff);
proc() options builtin,remember; 61 end

Related help pages include: interface, print.


gagin@thsun1.jinr.ru