2. Custom Format Options. The variable's value will be displayed in the Watch List using its declared data type. It is sometimes useful to display it in a different format. Enabling the Custom Format option lets you choose exactly how the variable is displayed. Here are the custom options:
A. Display As. This option lets you override the declared format and force the variable to be displayed in a different format. For example, you may have created a real array that actually contains integers. Selecting the Integer option would force the debugger to display the current value as an integer. Here is a description of each option:
Integer. If this option is selected, the variable will be displayed as an integer no matter what the actual data type is. This is useful for doing things like examining the address where a real is stored.
Byte. If this option is selected, the variable is displayed as a byte, no matter what the actual data type is.
Char. If this option is selected, the variable is displayed as an ASCII character, no matter what the actual data type is.
String. If the String data type is selected, the variable will be displayed as a string no matter what the actual data type is. This includes reals, which could hold an integer, a pointer to a string or a real, depending on how they are used. It does not include one-dimensional "char" or "address" variables that can only hold single-byte values. One byte values are too small to hold a string pointer so they would never be used to hold a string. It does include two-dimensional "char" or "address" variables because the first dimension can hold a pointer to a string and the second dimension can be used to dereference the pointer.
Real. If this option is selected, the variable will be displayed as a real no matter what the actual data type is. This is useful for instances where reals may be stored in complex data types.
B. Real Format. If the variable being watched is a real number, the value can be displayed in Fixed Point, Scientific and Engineering notation.
C. Digits. The Digits display controls how many digits past the decimal point are displayed for floating point numbers. For hex numbers, it controls the total number of hex nibbles displayed. If the hex number is bigger than the number of digits specified, the number of digits necessary to show the full number will be displayed.
D. Force Array. Because the debugger doesn't know if a variable is an array, you have to explicitly tell it if you want to display a variable as an array. To do this, enable the "Force Array" option.
When the option is enabled, you can set the number of dimensions and the size of each dimension.
Dims. The Dim value sets the number of dimensions in the array. The value can be between 1 and 10.
Dim Size. This is a list showing all the dimension in the array. The number of items increases or decrease as the number of Dims changes. Each item specifies the size of the dimension. Changing the values changes the way the array is displayed in the Watch List and in the Expanded Variable Display.
|
|
3. Integer Display Format. The Integer Display Format options (lower left) control the display of any integer numbers. Integers can be displayed in decimal, hexadecimal, octal and binary formats.
The debugger allows the same variable to be entered in the list multiple times. This lets you display the same variable in different ways. For example, the string variable to the right is displayed in seven different ways. The first item shows the string's address. The second item shows it as a string. The third item shows it as a hex integer. The fourth as a hex byte. The fifth, sixth and seventh are shown as individual characters for the first three elements of the array.
|
|
|