Previous Next        Current Page: NeXtMidas Training / Macros - Part 1 (Basics) / Procedures and Subroutines / CALL
back
Start Here   
Background   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
   + Macro Basics   
   + Loops and Control Structures   
   - Procedures and Subroutines   
      - PROCEDURE   
      - SUBROUTINE   
      - CALL   
      - Lab 1 - Macro Procedures   
         - Instructions   
         - Solution   
      - Lab 2* - Macro Procedures   
         - Instructions   
         - Solution   
   + Pipes in a Macro   
   + Messages in a Macro   
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   
WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • Using CALL:
    • CALL is used to invoke a PROCEDURE or SUBROUTINE from inside a macro.
    • CALL requires the name of a procedure or subroutine followed by any parameters required.
      STARTMACRO
        ...
        CALL MYPROC 7 {A=1,B=2,C=3} "Just another string"
        ...
      ENDMACRO
      
      PROCEDURE MYPROC L:MYNUM T:MYTABLE S:MYSTRING
        ...
      RETURN
    • It is not uncommon to see the same procedure called many times within a macro.
      STARTMACRO
        ...
        WHILE <test>
          CALL APROC <parameters>
        ENDWHILE
        ...
      ENDMACRO

back