| Stateflow User's Guide | ![]() |
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 both with custom code variables and with Stateflow variables.
varPtr = &var; ptr = &varArray[<expression>]; *(&var) = <expression>; function(&varA, &varB, &varC); function(&sf.varArray[<expression>]);
| Assignment Operations | Type Cast Operations | ![]() |
© 1994-2005 The MathWorks, Inc.