beautypg.com

C/c++ expressions, 1 writing c/c++ expressions, 1 immediate values – Renesas Emulator Debugger M16C PC4701 User Manual

Page 267

background image

10 C/C++ Expressions

253

10. C/C++

Expressions

10.1 Writing C/C++ Expressions

You can use C/C++ expressions consisting of the tokens shown below for registering C watchpoints
and for specifying the values to be assigned to C watchpoints.

Token

Example

Immediate values

10, 0x0a, 012, 1.12, 1.0E+3

Scope

::name, classname::member

Mathematical operators

+, -, *, /

Pointers

*, **, ...

Reference

&

Sign inversion

-

Member reference using dot operator

Object.Member

Member reference using arrow

Pointer->Member, this->M mber

e

Pointers to Members

Ob ct.*var, Pointer->*var

je

Parentheses

(, )

Arrays

Array[2], DArray[2] [3] , ...

Casting to basic types

(int), (char*), (unsigned long *), ...

Casting to typedef types

(DWORD), (ENUM), ...

Variable names and function names

var, i, j, func, ...

Character constants

'A', 'b', ...

Character string literals

"abcdef", "I am a boy.", ...

10.1.1 Immediate Values

You can use hexadecimals, decimals, octals as immediate values. Values starting with 0x are
processed as hexadecimals, those with 0 as octals, and those without either prefix as decimals.
Floating-point numbers can also be used to assign values to variables.

Notes

You cannot register only immediate values as C watchpoints.

The immediate value is effective only when it is used in C/C++ language expressions that specify
C/C++ watchpoints or when it is used to specify the value to be assigned to those expressions.
When using floating-point numbers, operation cannot be performed on an expression like 1.0+2.0.