11.07.2015 Views

tYSR20

tYSR20

tYSR20

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

386Part VI: The Part of TensChecking Use Syntax Highlighting tells the editor to color words within yourprogram to indicate their type. The editor flags comment lines with one color,keywords such as switch another, variable names yet another, and so on.The myriad of colors is a little nauseating at first, but it’s very useful onceyou get used to it. You can change the colors used, but I don’t see much pointin doing so.The Auto Indent feature is intended to be a labor saving device: The editor tabsthe cursor over the “appropriate” column when you press Return. Normally,the appropriate column is the same as the previous line that isn’t a commentor blank. The cursor automatically indents after an open brace. Unfortunately,it doesn’t unindent upon seeing a close brace (nothing’s perfect). BackspaceUnindents is a related and corresponding setting.I deselected Use Tab Character. This forces the editor to use spaces, andspaces only, to position the cursor. I did this primarily because I cut and pastedprograms from Dev-C++ into my word processor when writing this book.The Highlight matching braces/parenthesis setting has a serious implicationthat gets its own Top 10 listing.Highlight Matching Braces/ParenthesesThe Highlight matching braces/parenthesis setting appears in the EditorOptions window that is accessible from the Tools menu. When set, the Dev-C++ editor looks for the corresponding opening brace whenever you enter aclosed brace. In addition, when you select either an open or closed brace,Dev-C++ changes the corresponding brace to Bold. The same rules apply forparentheses.This feature helps you keep your braces matched. You can easily forget aclosed brace when you’re entering your program. It’s just as easy to get thebraces screwed up when editing your program.There is, however, a serious downside when using Dev-C++ Version 4.9.8.0:You can’t open a module in which there are more open braces than closedbraces. It seems that the editor scans your .cpp file when you open it tofigure out which closed brace goes with which open brace. The editor hangsup if it runs out of program before it finds enough closed braces.Thus, if Dev-C++ appears to just go away when you open your C++ sourcecode module, try the following:1. Kill Dev-C++ — it’s not going to return anyway. Press Control-Alt-Delete.Select the Task Manager option. Select Dev-C++ from the list of activeprograms that appear. Finally, select End Task.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!