C and C++ SoftBench User's Guide

Using SoftBench Debugger
Examining and Changing Data in Your Program
Chapter 7 185
If your program uses several different source languages, you can use
"prop lang" to re-evaluate a complicated expression without re-entering
it in the new language. For example, suppose you have a main program
written in C that calls FORTRAN subprograms for some of its functions.
Suppose you evaluate a complex C expression to check the value of a
certain variable. After you Step into one of the FORTRAN subprograms,
you can evaluate the expression from the main program, still using C
syntax, even though you are now in a FORTRAN subprogram.
1. Enter "prop lang C" in the "Debugger Input" input box and press
Enter.
2. If the "()" input box does not still show the desired expression, enter
the expression you want to evaluate into the "()" input box.
3. Select Print ( ) to evaluate the expression.
4. Enter "prop lang -default" into the "Debugger Input" input box
and press Enter. This returns DDE to the default language, which in
this case is FORTRAN.
You can also use the -lang option on the DDE print command:
print -lang C chapter="string"
Using Constants
Expressions can contain constants as well as variables. When DDE is in
C mode, integer constants can begin with "0" for octal, or "0x"or"0X" for
hexadecimal. Floating point constants are of the same form as those in
the source language, except that, unlike FORTRAN, no spaces are
allowed within a floating point constant. For example, 1.0, 3.14e8, and
26.62D-31 are valid FORTRAN floating point constants. See the
Language Manager appendices in HP/DDE Debugger User's Guide for
other restrictions on floating point constants.
Character and string constants must be entered in the syntax
appropriate for the current language. In C mode, character constants
must be entered in single quotes ('
char
') and are treated as integers. C
string constants must be entered in double quotes ('
string
') and are
treated like "char *" (pointer to char). FORTRAN strings can be
enclosed in either single or double quotes.
Some operators are not supported or have different semantics from the
standard language definition. See "Help: DDE Reference" for other
specifics.