Current Page: NeXtMidas Training Macros - Part 1 (Basics) Macro Basics Local vs Global Results
| Local vs Global Results: Local Results Are viewable only within the macro in which they were created. Results of one macro are not accessible by other macros. Results are not "left over" after the macro is done. Global Results Always available for read access. Global results are shared among all macros. Global results remain after the macro is done. Results in a NeXtMidas Macro: By default all results used in a NeXtMidas macro are Local Results. This is the "cleanest" approach. Prevents macros from interfering with each other. All results are "cleaned up" when the macro ends. Commands exist that can provide access to global results (`RESULTS` with the `/GLOBAL` switch) and it is possible to make a named result global (use the `GLOBAL` command). These are rarely used.
X-Midas Users Take Note:
NeXtMidas macros default to using Local Results while X-Midas macros default to Global Results. When X-Midas uses local results it automatically mangles the name at run-time to keep the results of different macros separate. In NeXtMidas the names declared in the macro stay the same at run-time (a more advanced mechanism is used to keep the results of different macros separate). Results in a NeXtMidas macro do not turn into `P<num>_<var>` as in X-Midas.