Hints for using Maple 6



Syntax

As you type in commands, Maple waits for a semicolon ; or a colon : before it evaluates the expression. If a colon is entered, the result is not displayed. This is useful when reading files or defining procedures.

Maple interpretes several characters differently than other programming languages:


Unexpected behaviour


Useful tricks


Packages

In Maple, as in many languages, one may package a collection of procedures for purpose of
  1. avoiding name conflicts of the procedures with the users' variables
  2. dynamically loading of selected procedures in a package
  3. accessing the entire package via short names for the procedures
  4. providing online help, for example, for a package and its procedures
Each purpose is accomplished by Maple by a different command.
  1. the customary protection mechanism of a name is by giving the procedures in a package compound names, such as `pkg_name/proc_name`, where pkg_name is the name of the package and proc_name the name of the procedure. An alternative is to use a subscripted name pkg_name['proc_name'] for the procedures in the package. In any case, pkg_name must be protected.
  2. readlib is used to load a previously saved procedure. The global Maple variable libname contains the paths to all the directories that are searched for the procedure.
  3. with ``points'' a selected procedure or an entire package to their short names. The names of the procedures in the package are retrieved from a Maple table that has to be stored in the variable pkg_name before issuing the with command. Each proc_name has an entry of the form
    pkg_name[proc_name] := 'readlib(`pkg_name/proc_name`)';
    or a direct definition
    pkg_name[proc_name] := proc...end;
    in this table.
  4. ?proc_name retrieves the help file from a library. The help file is stored in the database maple.hdb by the makehelp command.

©1997, 2001 Erich Kaltofen. Permission to use layout provided that copyright notice is not removed.