SUBROUTINE
Jump to navigation
Jump to search
mark beginning of macro subroutine
[NAME] - Name of the SUBROUTINE [PARAMETER 1] - Optional 1st parameter .. .. .. [PARAMETER N] - Optional Nth parameter SUBROUTINE is a macro-based command that is used to mark the beginning of a SUBROUTINE within a macro. Optional 1-N parameters may be passed to the SUBROUTINE. SUBROUTINES in NeXtMidas are structured just like subroutines in FORTRAN, and are used to modularize the macro in a similar way. SUBROUTINES have a separate results table from the rest of the macro. This means that commands within a SUBROUTINE can only access results declared in the SUBROUTINE, and that results declared within a SUBROUTINE are not available outside of the SUBROUTINE. [NOTE: results scoping in SUBROUTINES is NOT YET implemented; up to and including 2.6.x, SUBROUTINES work the same way that PROCEDURES do.] Switches: NONE Examples: startmacro .. call testSub .. endmacro subroutine testSub SAY "This is the inside of the subroutine" return See also: CALL, PROCEDURE, RETURN