| Using Stateflow | Search  Help Desk |
Pointer and Address Operators
The Stateflow action language includes address and pointer operators. The address operator is available for use with both custom code variables and Stateflow variables. The pointer operator is available for use with custom code variables only.Syntax Examples
These examples show syntax that is valid for use with custom code variables only.varStruct.field = <expression>; (*varPtr) = <expression>; varPtr->field = <expression>; myVar = varPtr->field; varPtrArray[index]->field = <expression>; varPtrArray[expression]->field = <expression>; myVar = varPtrArray[expression]->field;These examples show syntax that is valid for use with both custom code variables and Stateflow variables.
varPtr = &var; ptr = &varArray[<expression>]; *(&var) = <expression>; function(&varA, &varB, &varC); function(&sf.varArray[<expr>]);
Syntax Error Detection
The action language parser uses a relaxed set of restrictions. As a result, many syntax errors will not be trapped until compilation.