The dassign command evaluates an expression and replaces the value of a variable with the evaluated result. The location can be a scalar variable, a dereferenced pointer variable, or an element in an array or structure.
The default focus for the dassign command is
thread. If you do not change the focus, this command acts upon the
thread of interest (TOI). If the current focus specifies a width that is wider than
t (thread) and is not
d (default),
dassign iterates over the threads in the focus set and performs the assignment in each. In addition, if you use a list with the
dfocus command, the
dassign command iterates over each list member.
The CLI interprets each symbol name in the expression according to the current context. Because the value of a source variable might not have the same value across threads and processes, the value assigned can differ in your threads and processes. If the data type of the resulting value is incompatible with that of the target location, you must cast the value into the target’s type. (
Casting is described in Chapter 13 of the
TotalView User Guide.)
If value contains an expression, the TotalView expression system evaluates the expression
. See Using the Evaluate Window in the TotalView User Guide for information.
Stores the value 102 in each occurrence of variable scalar_y for all processes and threads in the current set.
Does not work and the CLI displays an error message. If i is a simple scalar variable, you can use the following statements: