.M File Extension

There are 4 file types use the .M file extension:

  1. Objective-C Implementation File
  2. Mercury Source Code File
  3. MATLAB Source Code File
  4. Mathematica Input File

1. Objective-C Implementation File

Objective-C Implementation File

An M file is a class implementation file used by programs written in Objective-C. It begins with the @implementation directive and initializes variables and functions that can be referenced by other Objective-C source files. M files may also reference header (.H) files.

Objective-C is most commonly used to implement applications for Apple's Mac OS X and iOS operating systems. Apple's Cocoa API provides the Objective-C programming interface for Mac OS X, and the iOS API provides the programming interface for the iOS platform.

Software's name License Platforms
Apple complier (cc) Apple complier (cc) Linux
Apple Xcode Apple Xcode Freeware Mac
Bare Bones BBEdit Bare Bones BBEdit Commercial Mac
GNU Compiler Collection (GCC) GNU Compiler Collection (GCC) Open Source LinuxMac
gVim gVim Open Source Windows
jEdit jEdit Free LinuxMacWindows
MacroMates TextMate MacroMates TextMate Commercial Mac
MacVim MacVim Open Source Mac
Richardson EditRocket Richardson EditRocket Commercial LinuxMacWindows
Stepstone compiler (objcc) Stepstone compiler (objcc) Linux
Vim Vim Open Source LinuxMacWindows

Updated: May 8, 2016

2. Mercury Source Code File

Mercury Source Code File

Source code file written using Mercury, a functional programming language that was developed at the University of Melbourne, Australia; saved using plain text formatting and uses syntax similar to Prolog.

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.

Software's name License Platforms
Beaver Beaver Free Linux
GNU Emacs GNU Emacs Open Source LinuxMacWindows
gVim gVim Open Source Windows
Mercury Compiler Mercury Compiler Free Linux
Microsoft Notepad Microsoft Notepad Bundled MacWindows
Other text editor Other text editor LinuxMacWindows
Vim Vim Open Source LinuxMacWindows
winmercury winmercury Free Windows

Updated: July 21, 2011

3. MATLAB Source Code File

MATLAB Source Code File

An M file is a text file used by MATLAB, an application used for mathematical computations. It can store a script, class, or an individual function in the MATLAB language. M files are used for executing algorithms, plotting graphs, and performing other mathematical operations.

Software's name License Platforms
Notepad++ Notepad++ Freeware Windows
The MathWorks MATLAB The MathWorks MATLAB Commercial LinuxMacWindows

Updated: September 22, 2017

4. Mathematica Input File

Mathematica Input File
  • Developer Wolfram Research
  • Popularity
    3.2 (16 votes)
  • Category Data Files
  • Format Text

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.

Software's name License Platforms
Apple TextEdit Apple TextEdit Bundled Mac
gedit gedit Open Source Linux
Leafpad Leafpad Free Linux
Microsoft Notepad Microsoft Notepad Bundled MacWindows
Notepad++ Notepad++ Freeware Windows
Other text editor Other text editor LinuxMacWindows
Wolfram Research Mathematica Wolfram Research Mathematica Commercial LinuxMacWindows

Updated: February 21, 2011

Search File Extensions