NA-MAAB — a
JMAAB — a
All
All operations, including substitution, comparison, arithmetic, etc., shall be performed between variables of the same data type.
The data type of the actual arguments and the formal arguments in a function call shall be the same.
Not Applicable
Variables use the same data type for calculations.
Example: Comparison operation
Example: Arithmetic operations and assignment operations (compound expressions)
Variables have different data types but are explicitly typecast before calculation.
Example: Comparison operation
Example: Arithmetic operations and assignment operations (compound expressions)
The data type of actual arguments and formal arguments in the function call are the same.
Variables use different data types for calculations.
Example: Comparison operation
Example: Arithmetic operations and assignment operations (compound expressions)
Calculations are performed between unsigned integer type variables and signed integers.
The data type of actual arguments and formal arguments in the function call are different.
Sub ID a:
Implicit data type conversion can produce unexpected results.
Model Advisor check: Check for implicit type casting in Stateflow (Simulink Check)
R2020a
JMAAB guideline jc_0802, which is available in Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow on the MathWorks® website.
Type Cast Operations (Stateflow)
Differences Between MATLAB and C as Action Language Syntax (Stateflow)