12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Figure 10.13.<br />

The Code Editor with<br />

a bookmark set.<br />

NOTE<br />

More on Projects<br />

To return to the bookmark, press Ctrl plus the number of the bookmark to which you want<br />

to return. Us<strong>in</strong>g the same example, you would type Ctrl+0 to go back to the bookmark. To<br />

clear a bookmark, place the editor cursor anywhere on the l<strong>in</strong>e conta<strong>in</strong><strong>in</strong>g the bookmark and<br />

aga<strong>in</strong> press Ctrl+Shift+0.<br />

Bookmarks can be set for each file you have open <strong>in</strong> the Code Editor.<br />

For <strong>in</strong>stance, you can have bookmark 0 set <strong>in</strong> one source file and<br />

another bookmark 0 set <strong>in</strong> another source file. This means that<br />

bookmarks cannot be found across source files. If you set bookmark 0<br />

<strong>in</strong> Unit1.cpp, you cannot press Ctrl+0 from Unit2.cpp and expect to be<br />

taken to the bookmark <strong>in</strong> Unit1.cpp.<br />

To illustrate the use of bookmarks, do the follow<strong>in</strong>g:<br />

1. Open any source file <strong>in</strong> the Code Editor.<br />

2. Scroll almost to the bottom of the file and click on a l<strong>in</strong>e of code.<br />

3. Press Ctrl+Shift+0 to set a bookmark. The bookmark icon shows <strong>in</strong> the Code<br />

Editor gutter.<br />

4. Press Ctrl+Home to move to the top of the source file.<br />

5. Now press Ctrl+0 to jump back to the bookmark. The Code Editor changes to<br />

show the l<strong>in</strong>e of code where the bookmark was set, and the cursor is placed exactly<br />

where it was when you set the bookmark.<br />

6. Type Ctrl+Shift+0 aga<strong>in</strong> to clear the bookmark. The bookmark is cleared, and the<br />

bookmark icon disappears from the Code Editor gutter.<br />

Bookmarks are temporary. When you close the source file and reopen it, the bookmark is not<br />

preserved.<br />

381<br />

10

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

Saved successfully!

Ooh no, something went wrong!