User`s guide
44
Chapter 5: Examining and Changing Data
Conflicts Between Variable Names and Keywords
When naming variables in your program, avoid using any dbx keywords. If
you have a variable with the same name as a dbx keyword and you attempt
to use that variable in a dbx command, dbx reports a syntax error.
If you do have a program variable with the same name as a dbx command,
you can force dbx to treat it as a variable by enclosing the variable in
parentheses. For example, if you try to print the value of a variable namedin
by entering the following command, dbx displays an error.
(dbx) print in
print in
^ syntax error
Suggestion: in is a dbx keyword; a revised command is in history.
Type !16 or !! to execute: print (in)
The correct way to display the value of input is to enter:
(dbx) print (in)
34
dbx keywords include:
all not
and or
at pgrp
div pid
if sizeof
in to
mod xor
By default, dbx treats as keywords the following C type keywords:
signed struct
unsigned union
short enum
long double
int float
char
However, if your program is not written in C or C++, you may wish to
disable these keywords. The dbx variable$ctypenames determines whether or
not C type keywords are treated as dbx keywords. If $ctypenames is set to 1