
6 Editing and Debugging M-Files
Appearance of an M-File — Making F iles More Readable
In this section...
“Syntax Highlightin g” on page 6-28
“Indenting” on page 6-29
“Function Indenting” on page 6-29
“Line and Colum n Numbers” on page 6-30
“Highlight Current Line” on page 6-30
“Right-H and Text Limit” on page 6-31
“View Function or Subfunction” on page 6-31
“Code Folding—Expanding and Collapsing M-File Constructs” on page 6-31
“Split Screen Display” on page 6-38
Note You can specify the default behaviors for some of these features—see
“Preferences” on page 2-59.
Syntax Highlighting
Some entries appear in different colors to help yo u better find matching
elements, such as
if/else statements. Similarly, unterminated strings
have a different color than terminated strings. This is called syntax
highlighting and is used in the Command Window and History, as well as
in the Editor/Debugger. For more inform ation, see the Command Window
documentation for “Syntax Highlighti n g” on page 3-16.
When you paste or drag a selection from the Editor/Debugger to another
application, such as Microsoft Word, the pasted text maintains the syntax
highlighting colors and font characteristics from the Editor/Debugger.
MATLAB pastes the selection to the clipboard in RTF format, which many
Windows and Macintosh applications support.
6-28
Commentaires sur ces manuels