Previous Next        Current Page: NeXtMidas User's Guide / System Operation / Function Invocation
back
- FAQs   
- Release Information   
- Getting Help   
+ Basic Concepts   
+ Result Parameters   
- JSON Support   
- XML Support   
+ Files   
- System Operation   
   - Basic Command Form   
   + Parameters   
   + Switches   
   + Metacharacters   
   - Inline Calculations   
   - Function Invocation   
+ 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   


Function Invocation and In-Line Functions

In-Line Functions

In some cases it is possible to invoke a NeXtMidas command, most importantly CALCULATOR, using function-like syntax on the command line of a different operation. The following words are reserved to allow the in-lining:

  • CALC - To perform complex mathematical functions.
  • FILE - To open, operate on, and close a file.
  • SEDIT - For string operations.
  • TEST - For logical tests

For example,

  nM>res x CALC(1,2,*)

Sets the result x to 2.

Function Invocation

See the INVOKE command to learn how to call commands NOT IN THE NEXTMIDAS COMMAND DICTIONARY from the macro language. For example,

  nM>invoke D:pi java.lang.Math.pi
  nM>invoke D:dval java.lang.Math.sin(pi)

gets pi and calls the static function sin in the Java Math class and returns the output into the result DVAL.


back