2.11.5.2 Changing the contents of local variables

The values of local variables and parameter values can be edited.

Select the value of the subject local variable or the value of parameters to it in the [Value] area and click on it again. The selected value is placed in edit mode. (Pressing the [Esc] key cancels the edit mode.)

Enter a value directly from the keyboard and then hit the [Enter] key. The value you've changed is written into the debug tool's target memory. At this time, CS+ checks the value to see if it fits to type. If inappropriate, the editing you've done is ignored.

Caution

This operation cannot be performed during program execution.

 

Remark 1.

If the numeral entered for a variable is smaller than the size of the variable, its high-order digits are padded with zeroes.

Remark 2.

If the numeral entered for a variable is larger than the size of the variable, its high-order digits are masked.

Remark 3.

For character arrays (char type or unsigned char type), if ASCII is selected for the display form, it is possible to use character strings (ASCII, Shift_JIS, EUC-JP, or Unicode (UTF-8/UTF-16) to enter values.

Remark 4.

Local variables can also be entered using ASCII characters.

-

When using ASCII characters to enter values
Enter the letter "'A'" in the [Value] area for the variable "ch".
>>The numeral "0x41" is written into the memory area to which the variable "ch" is mapped.

-

When using numerals to enter values
Enter the numeral "0x41" in the [Value] area for the variable "ch".
>> The numeral "0x41" is written into the memory area to which the variable "ch" is mapped.

-

When using character strings (ASCII) to enter values
Set the display form of the character array "str" to ASCII and then enter the letters "'ABC'"
in the [Value] area.
>> The numerals "0x41," "0x42," "0x43" and "0x00" are written into the memory area
to which the array "str" is mapped.