The file extension M is also used as an implementation file by programs that are written in Objective-C. The implementation files with the M file extension starts with the @implementation directive. This function line declares the variables and functions, which may then be referenced by following Objective-C source files and header file.Objective-C is an object oriented programming language, which includes a messaging similar to Smalltalk in style. Objective-C can be described as a small layer on top of the C programming language, or a superset of the language. Because of this reason, Objective-C compiler is able to compile any program written using the C language. Codes used in Objective-C are mostly derived from the C language. These include function declarations, expressions, preprocessing, and function calls. On the other hand, the syntax for its object oriented features was designed to incorporate Smalltalk style messaging.
The M file extension is used for script file used by Miranda IM.
Contains functions or a set of instructions used by the Mathematica, a program for creating and running mathematical functions; saved in a text format, which can be viewed and edited with a basic text editor. Files named "init.m" are initialization files that contain settings that are loaded when the Mathematica program is opened.
Text file used by MATLAB, an application used for mathematical computations; can store a script, class, or an individual function in the MATLAB language; used for executing algorithms, plotting graphs, and performing other mathematical operations. A MATLAB file with the ".m" extension is referred to as an "M-File."
Source code file written using the Mercury functional programming language, which was developed at the University of Melbourne, Australia; saved using plain text formatting and uses syntax similar to the Prolog language. Mercury was written in order to provide a robust language for large real world applications. It includes several error-checking features not provided by other logic programming languages. For example, the language incorporates static analysis that can catch type checking errors before runtime. This enables greater assurance over the correctness of the program and also allows the compiler to generate more efficient code. However, the developer must specify each of the "type," "mode," and "determinism" constructs while programming, which is not necessarily required by other languages. NOTE: The developmental version of the Mercury compiler is currently distributed in a source code format and does not include compiler binaries. However, a Windows port of Mercury, called winmercury, includes binaries. It also includes Vim syntax highlighting files for source code editing.
The M file extension is related to Limbo, an application programming language for Inferno. Syntactically similar to C, it has several features that make it simpler, safer and yet more powerful and better suited to the development of concurrent, distributed systems. The Limbo compiler generates architecture independent object code which is then interpreted by the Inferno Virtual Machine or compiled just before runtime to improve performance. This ensures that Limbo applications are completely portable across all Inferno platforms.