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.

404 Day 11<br />

NOTE<br />

The Expression field at the top of the Watch Properties dialog box is where you can enter a<br />

variable name to edit or to add to the Watch List. If you are add<strong>in</strong>g a watch by select<strong>in</strong>g it<br />

from the Code Editor w<strong>in</strong>dow, this field will already be filled <strong>in</strong> (see the section titled “Add<strong>in</strong>g<br />

Variables to the Watch List”). This field is a combo box that can be used to select previously<br />

used watch items.<br />

You use the Repeat count field when you are <strong>in</strong>spect<strong>in</strong>g arrays. For example, let’s say you have<br />

an array of 20 <strong>in</strong>tegers. To <strong>in</strong>spect the first 10 <strong>in</strong>ts <strong>in</strong> the array, you would enter the first<br />

element of the array <strong>in</strong> the Expression field (array[0], for example) and then enter 10 <strong>in</strong> the<br />

Repeat count field. The first 10 elements of the array would then be displayed <strong>in</strong> the Watch<br />

List.<br />

If you just add the array name to the Watch List, all elements <strong>in</strong> the<br />

array will be displayed. Use the Repeat count field when you want to<br />

view only a specific number of array elements.<br />

You use the Digits field only when <strong>in</strong>spect<strong>in</strong>g float<strong>in</strong>g-po<strong>in</strong>t numbers. Enter the number of<br />

significant digits you want to see when your float<strong>in</strong>g-po<strong>in</strong>t number is displayed <strong>in</strong> the Watch<br />

List. The displayed digits are rounded, not truncated. Another field <strong>in</strong> this dialog box, the<br />

Enabled field, determ<strong>in</strong>es whether the watch item is currently enabled.<br />

The rema<strong>in</strong>der of the Watch Properties dialog box is comprised of the various display options<br />

from which you can choose. Each data type has a default display type, and that type will be<br />

used if you choose the Default view<strong>in</strong>g option. The Default view<strong>in</strong>g option is the default.<br />

(Sorry, there’s just no other way to say it!) Select one of the other view<strong>in</strong>g options to view the<br />

data <strong>in</strong> other ways. Figure 11.6 shows the Watch List w<strong>in</strong>dow with two variables added and<br />

with various view<strong>in</strong>g options applied. The buff variable is a character array, and the i variable<br />

is an <strong>in</strong>teger.<br />

Figure 11.6.<br />

The Watch List with<br />

various view<strong>in</strong>g<br />

options.<br />

To modify a watch item, click on the item <strong>in</strong> the Watch List and choose Edit Watch from<br />

the Watch List speed menu. The Watch Properties dialog box is displayed, and you can edit<br />

the watch item as needed.

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

Saved successfully!

Ooh no, something went wrong!