Previous Next        Current Page: NeXtMidas User's Guide / Basic Concepts / Commands / Macros
back
- FAQs   
- Release Information   
- Getting Help   
- Basic Concepts   
   - Summary of Capabilities   
   + System Overview   
   + Shell   
   + Option Trees   
   - Commands   
      - Intrinsics   
      - Primitives   
      - Macros   
      - Operating System   
+ Result Parameters   
- JSON Support   
- XML Support   
+ Files   
+ System Operation   
+ Macros   
+ Java WebStart   
+ Graphics   
+ X-Midas Interoperability   
+ Third-Party Compatibility   
+ Build/Installation Options and Customization   
- Running NeXtMidas Independently   
- WebVNC to deploy NeXtMidas as a Web App   
+ Security and Secure Communication   
- Timelines - Keywords, Updating, Known Issues   
+ Installing and Using Docker   
+ 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.


back