Go to main content
Oracle® Developer Studio 12.6: Debugging a Program with dbx

Exit Print View

Updated: June 2017
 
 

assign Command

In native mode, the assign command assigns a new value to a program variable. In Java mode, the assign command assigns a new value to a local variable or parameter.

Native Mode Syntax

assign variable = expression

where:

expression is the value to be assigned to variable.

Java Mode Syntax

assign identifier = expression

where:

expression is a valid Java expression, which can include any of the following:

  • class-name is the name of a Java class. You can use either of the following:

    • The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner

    • The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.

  • field-name is the name of a field in the class.

  • identifier is a local variable or parameter, including this, the current class instance variable (object-name.field-name) or a class (static) variable (class-name.field-name).

  • object-name is the name of a Java object.