Previous Next        Current Page: NeXtMidas User's Guide / Basic Concepts / Commands / Macros
FAQs   
Release Information   
Getting Help   
Basic Concepts   
   - Summary of Capabilities   
   + System Overview   
   + Shell   
   + Option Trees   
   - Commands   
      - Intrinsics   
      - Primitives   
      - Macros   
      - Operating System   
Result Parameters   
XML Support   
Files   
System Operation   
Macros   
Applets and WebStart   
Graphics   
X-Midas Interoperability   
Third-Party Compatibility   
Installation and Customization   
Running NeXtMidas Independently   
Glossary   


Macros

A macro is a sequence of other NeXtMidas commands of any type including other macros stored in a text file with the extension .mm. No programming, in the conventional sense, is required to add a new macro command to NeXtMidas or to modify an existing one. Macros exist primarily to make NeXtMidas extendable by "ordinary" users who are not professional software developers. Nevertheless, as the section on writing macros shows, macros can perform very elaborate functions, and some familiarity with programming is helpful.

There are two types of macros: installed and user. An installed macro has an entry in the dictionary of the option tree with which it is distributed. No dictionary entry is required for a user macro. This simplifies the creation and testing of macros that may have only temporary applicability or not be of general interest. The primary limitations of a user macro are

  • Its parameters do not have default values supplied by the shell.
  • Its command name does not appear in menu listings.
  • It does not have an explain file that can be accessed by the shell.

To run a user macro, it is necessary to add a '%' prefix to the command line so that NeXtMidas knows not to search its dictionaries and not to treat the command as an operating system command.