Previous Next        Current Page: NeXtMidas Training / Getting Started - Part 2 / Advanced Results Parameters / In-Line Functions
Start Here   
Background   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
   - Advanced Results Parameters   
      - Tables   
         - Creating   
         - Accessing   
         - Modifying   
         - Advanced   
      - In-Line Functions   
      - Objects   
         - The Invoke and New Commands   
      - Using Carets   
      - Using Flag Strings   
      - Automatic Type Conversion   
      - Type Casting   
   + Lab 3   
   + Threads in NeXtMidas   
   + Lab 4   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
Applets & WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • In-Line Functions
    • In-line functions may be embedded in conditional and control statements. The comprehensive list of in-line functions are as follows:
      TEST - For logical tests
      nM> res x test("a string",EQS,"A STRING2")
      nM> res x
        L: X               = 0
      
      CALC - For mathematical calculations
      nM> res x calc(10,20,+)
      nM> res x
        D: X               = 30.0
      
      SEDIT - For string editing
      nM> res str sedit("a string",SUBS,"string","new string",LOCASE)
      nM> res str
      12S: STR             = a new string
      
      FILE - For file header and data access (Midas Blue files only)
      nM> res file(apenny.prm).getsize
        d: FILE(APENNY.PRM).GETSIZE = 128.0
      
X-Midas Users Take Note:
X-Midas treats a name with a following open-parens ("(") as an element in a file (Vectored Results), like:
    X-Midas> res <filename>(<index>)
In NeXtMidas, an element in a file is accessed as:
    nM> res FILE(<filename>).data(<offset>)