Main Content

exit, ex

Generate implicit event when state becomes inactive

Description

exit(state_name) generates an implicit local event when the chart execution exits the state state_name. If more than one state has the same name, use dot notation to specify the name of the state. For more information, see State Name.

ex(state_name) is an alternative way to execute exit(state_name).

example

Examples

expand all

Define an implicit local event when the chart execution exits the state Fan.Off.

exit(Fan.Off)

Stateflow chart that uses the implicit event exit.

Tips

The exit operator is supported only in Stateflow® charts in Simulink® models.

Version History

Introduced before R2006a