Stateflow | ![]() ![]() |
Pointer and Address Operations
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.
Note The action language parser uses a relaxed set of restrictions. As a result, many syntax errors are not trapped until compilation. |
The following 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;
The following 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>]);
![]() | Assignment Operations | Typecast Operations | ![]() |