Stateflow User's Guide Previous page   Next Page

Assignment Operations

The following assignment operations are supported in Stateflow action language.

Example
Description
a = expression
Simple assignment
a := expression
Used primarily with fixed-point numbers. See Assignment (=, :=) Operations for a detailed description.
a += expression

Equivalent to a = a + expression

a -= expression

Equivalent to a = a - expression

a *= expression

Equivalent to a = a * expression

a /= expression

Equivalent to a = a / expression

The following assignment operations are supported in Stateflow action language when Enable C-bit operations is selected in the properties dialog for the chart. See Specifying Chart Properties.

Example
Description
a |= expression
Equivalent to a = a | expression (bit operation). See operation a | b in Binary and Bitwise Operations.
a &= expression
Equivalent to a = a & expression (bit operation). See operation a & b in Binary and Bitwise Operations.
a ^= expression
Equivalent to a = a ^ expression (bit operation). See operation a ^ b in Binary and Bitwise Operations.


Previous page  Unary Operations Pointer and Address Operations Next page

© 1994-2005 The MathWorks, Inc.