Development Environment    

Appearance of an M-File

The following features make M-files more readable:

You can specify the default behaviors for some of these--see Preferences for the Editor/Debugger.

Syntax Highlighting

Some entries appear in different colors to help you better find matching elements, such as if/else statements. This is called syntax highlighting and is used in the Command Window as well as in the Editor/Debugger. For more information, see the Command Window documentation for Syntax Highlighting and Parentheses Matching.

Indenting

Flow control entries are automatically indented to aid in reading loops, such as while/end statements.

To move the current or selected lines further to the left, select Decrease Indent from the Text menu. To move the current or selected lines further to the right, select Increase Indent from the Text menu. If after using these features you want to apply automatic indenting to selected lines, select Smart Indent from the Text menu, or right-click and select it from the context menu. For more information about smart indenting, see the preference for smart indent. See also Keyboard and Indenting Preferences for the Editor/Debugger.


  Creating and Editing M-Files with the Editor/Debugger Commenting