MiniM OverviewMacro Preprocessor
MiniM Database Server since version 1.6 supports macroses in macro routines. Developer can use preprocessor directives and macros substitution.
While traditional routines, what was defined in the MUMPS language, does not supports preprocessor directives such as #include, #ifdef, #define and others, macro preprocessor implements this.
Preprocessor allow to automatically check macros existence, generate MUMPS code in dependence of current environment and MUMPS version, write much more readable code and hide many magic conjurations.
Macros are the one of power tools for developers to improve project scalability, reduce number of misprints and in pair with debugger help to develop much complex modules and decrease development time.
Routines have the following types:
Example of preprocessor usage:
Routine defines.INC: #; application definitions #ifndef incDEFINESINCLUDED #define incDEFINESINCLUDED #define APPDATA(%id) ^APP("data",%id) #define APPIND(%n,%v) ^APP("ind",%n,%v) #endif
After including this routine
in macro routine developer can use defined macros $$APPDATA and $$$APPIND.
In the case of macro definitions changed, routine recompilation automatically use new definitions. If developer make a misprint in the macros name, preprocessor show the place of the error. Macro definition can contain long substitution string and macro routines seems much more readable for developers.
Macro routines exports and imports using extended routine file format RSA (Routine Save Archive) in which are stored routine types. This format can be used to interchange code between InterSystems Cache and MiniM Database Server.
For more information see this site topics, use search, or query additional info.
Emails: Info Tech Support