File extensions

SRC Modula-3 recognizes files with the following suffixes:

    .i3 (.m3)   Modula-3 interface (module) sources.
    .ig (.mg)   generic interface (module) sources.
    .ix (.mx)   linker information.
    .ic (.mc)   M3CG intermediate language files.
    .is (.ms)   intermediate assembly files.
    .io (.mo)   object files.
    .c          C source files.
    .s          foreign assembly source files.
    .o          foreign object files.
    .a          library archives.
    .ax         linker information for libraries.
    .b          "base" programs.  An executable program
                  that needs an overlay.

When a file is compiled into another form, the resulting file has the same base name as the input file and its extension reflects the new form of the file.

The first pass of the compiler produces two files, a intermediate language file that is compiled by the second pass, and a link info file that is used by the Modula-3 linker. Link info files have suffixes .ix, .mx, .ax, and .bx. They cannot be named on the command line and must be present along side the corresponding .io, .mo, and .a files. If a library (.a file) doesn't have a link info file (.ax), it is assumed to be library that contains no Modula-3 code.

The source for a module named M is normally in a file named M.m3. The source for an interface named I must be in a file named I.i3.

The source for a generic module named M must be in a file named The source for a generic interface named I must be in a file named I.ig.

The main program is the module that implements the interface Main.

A library archive can contain object files produced by m3 or other language processors.