This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Action Language Auto Correction

Stateflow® charts that use MATLAB® as the action language will automatically correct the following syntax in the state transition diagrams.

  • Adds brackets [], if missing, to statements that it recognizes as transition conditions.

  • Adds braces{}, if missing, to statements that it recognizes as transition actions.

  • Converts the following C syntax to MATLAB syntax:

    • Increment and decrement operations, such as a++ and a--. For example, a++ is changed to a=a+1.

    • Assignment operations, such as a+=expr, a–=expr, a*=expr, and a/=expr. For example, a+=b is changed to a=a+b.

    • Evaluation operations, such as a!=expr and !a. For example, a!=b is changed to a~=b.

    • Inserts explicit casts for any literal constant assignment. For example, if y is defined as type single, then y=1 is changed to y=single(1).

  • Adds the type entry: to state actions that do not have a specified type.

    For example, the following state action:

    automatically corrects to this:

Was this topic helpful?