MiniM Getting Started Guide
How to Create and Compile a Routine
MiniM Database Server stores source text of routines in the datafiles on the server. Routines are like a simple text files with names and types. Routine editor calls server to get and put lines of routines.
To help developers better understand and view source of routines, MiniM Routine Editor uses syntax highlightning for different syntax elements:
MiniM Routine Editor can be run on any computer including the same computer where runs MiniM Database Server and works ober TCP/IP connection.
While editing MiniM Routine Editor edits lines of routines in own memory. To transfer text after creation or editing to the server this routine must be saved:
To help developer to understand that routine was changed MiniM Routine Editor indicate this with symbol "*" near of the name.
While MiniM Routine Editor connected to MiniM Database Server, it can edit and show routines only in current database. To edit routines in other database MiniM Routine Editor must be reconnected:
MiniM Routine Editor uses different highlighters for different routine types. Intermediate routines (*.INT extension) can contain only pure MUMPS syntax elements, and macro routines (*.MAC and *.INC extensions) can contain pure MUMPS and preprocessor syntax elements.
Both highlightning schemes can be changed in editor settings and works on both versions - under Windows and under Linux.
Whilst MiniM Database Server is interpreter of the MUMPS code, he cannot execute pure MUMPS routines as is, it is interpretator of compiling type. Before execution routine must be compiled first.
Command "Compile Current" compiles only currently editing routine and command "Compile All" compiles all opened routines.
Routines with extension *.INC are indended only for inclusion and on compilation this routines MiniM Routine Editor does nothing, this routines does not produce any executable code. After compilation MiniM Database Server generates special normalized bytecode for compiled routine. *.INT routines compiles as is and *.MAC routines compiles to *.INT routines throught preprocessor and then compiles to executable bytecode.
Compilation in Windows version can looks like this:
And compilation in Linux version can looks like this:
If compilation result does not contain any critical errors, database will contains bytecode for this routine.
If routine contains inadequate MUMPS syntax elements or MUMPS syntax elements which are not supported by current MiniM Database Server version, compilation report will contain error messages with short man-readable description:
If routine contain only syntax error, bytecode anyway produced. Line with syntax error will contain special bytecode to generate syntax error, and other lines will have corrent corresponding bytecode. This MiniM behaviour was intended to allow mix MUMPS syntax elements for different MUMPS implementations and use routines with unsupported syntax elements under the IF command or other conditionals.
While routine was compiled and next edited next, bytecode, of course, will have an old state. To update bytecode be in correct state, recompile this routine again.
For developers are very important to understand how to create new routine. Select command File | New:
After this MiniM Routine Editor create empty new routine text:
After this command this text exists only in MiniM Routine Editor and does not have name and extension. On saving MiniM Routine Editor offer to choose name and extension:
And, on saving, MiniM Routine Editor transfers routine source code to the server and saves it in the database. After saving this routine can be compiled.
Except editing and compiling routine, MiniM Routine Editor also implements ordinal editing features such as searching, clipboard support, undo-redo and searcing in routines on the server. Search commands can use regular expressions in addition to ordinal text searching.
On closing editor windows MiniM Routine Editor check that this routine was edited but not saved and offers to save this routine.
Emails: Info Tech Support