Creating Array Filter Expressions
The filtering capabilities described in the previous sections are those that you use most often. In some circumstances, you may need to create a more general expression. When you create a filter expression, you’re creating a Fortran or C Boolean expression that TotalView evaluates for every element in the array or the
array slice. For example, the following expression displays all array elements whose contents are greater than 0 and less than 50, or greater than 100 and less than 150:
($value > 0 && $value < 50) ||
($value > 100 && $value < 150)
Here’s the Fortran equivalent:
($value .gt. 0 && $value .lt. 50) .or.
($value .gt. 100 .and. $value .lt.150)
The $value variable is a special TotalView variable that represents the current array element. You can use this value when creating expressions.
Notice how the
and and
or operators are used in these expressions. The way in which TotalView computes the results of an expression is identical to the way it computes values at an eval point. For more information, see
"Defining Eval Points and Conditional Breakpoints".