| Using Stateflow | Search  Help Desk |
User-Written Functions
You can specify calls to user-written functions in the action language. These guidelines apply to user-written function calls:func(`string').
Example: Function Call Transition Action
These are example formats of function calls using transition action notation.
S1 is active, event e occurs, c is true, and the transition destination is determined, then a function call is made to function_name with arg1, arg2, and arg3. The transition action in the transition from S2 to S3 shows a function call nested within another function call.
Example: Function Call State Action
These are example formats of function calls using state action notation.
S1 occurs, S1 is marked active and then its entry action, a function call to function_name1 with the specified arguments, is executed and completed. If S2 is active and an event occurs, the during action, a function call to function_name3 with the specified arguments, executes and completes.