How to include a Maple procedure file?

I have a procedure that I use frequently. I tried to include this procedure in other Maple sessions so that I can reuse that procudure. I tried the command $include but received the following error message:

$include "c:/myworks/myplot.wm"

Error, unexpected string
 

where myplot.wm is a file that contains a procedure which I want use repeatedly.  What is wrong there?

 

Thanks.

 

alec's picture

read

$include is a preprocessor directive. It works only in command line maple for files read from the stdin, see ?preprocessor.

If your myplot.wm is in correct Maple input format, then it should have a correct extension, such as .mpl, for example. It can be read using read command.

A better way of using it would be by adding it to your own Maple library, see ?LibraryTools.

Alec

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}