CMSIS-View  
Record program events, display status information, and analyze execution faults
 
Loading...
Searching...
No Matches
/component_viewer/objects/object/.../calc

Execute calculations using Expressions.

Parent Element Element Chain
object /component_viewer/objects/object
list /component_viewer/objects/object/.../list
Attributes Description Type Use
cond Conditional execution: element is executed when expression result is not 0. Default value is 1. xs:string optional
Body Description Type Use
text Expressions that are calculated. No XML-comments are allowed in this section. xs:string optional

Example:

<object name="MyCalculations">
<var name="y" type="int32_t" value="0" />
<var name="z" type="int32_t" value="0" />
<calc>
y = 1;
z = 1;
</calc>
<calc cond="z != 0" >
z = (z == 1) ? 100 : 200;
y = z / 4;
</calc>
<object>