Stateflow    

Special Symbols

Stateflow notation uses the symbols t, $, ..., %, //, /*, ;, F, and hexadecimal notation to provide the user with special features in action language notation. These uses are described in the topics that follow.

Time Symbol 't'

You can use the letter t to represent absolute time in simulation targets. This simulation time is inherited from Simulink.

For example, the condition [t - On_time > Duration] specifies that the condition is true if the value of On_time subtracted from the simulation time t is greater than the value of Duration.

The meaning of t for nonsimulation targets is undefined since it is dependent upon the specific application and target hardware.

Literal Code Symbol '$'

Place action language you want the parser to ignore but you want to appear as entered in the generated code within $ characters. For example,

The parser is completely disabled during the processing of anything between the $ characters. Frequent use of literals is discouraged.

Continuation Symbol '...'

Enter the characters ... at the end of a line to indicate the expression continues on the next line.

Comment Symbols %, //, and /*

Stateflow action language supports the following comment formats:

MATLAB Display Symbol ';'

Omitting the semicolon after an expression displays the results of the expression in the MATLAB Command Window. If you use a semicolon, the results are not displayed.

Single-Precision Floating-Point Number Symbol F

Stateflow action language recognizes a trailing "F" for specifying single-precision floating-point numbers as in the action statement x = 4.56F;. If a trailing "F" does not appear with a number, it is assumed to be double-precision.

Hexadecimal Notation

The action language supports C style hexadecimal notation (for example, 0xFF). You can use hexadecimal values wherever you can use decimal values.


  Temporal Logic Events Defining Stateflow Interfaces