Stateflow | ![]() ![]() |
Using Function Notation with Methods
As an alternative to dot notation, you can access object methods with standard function call notation. For example, you can use the get
method to access the Name property of a Chart object, ch
, through one of the following commands:
If you have array arguments to methods you call, use function notation. The following example returns a vector of strings with the names of each chart in the array of Chart objects chartArray
:
If, instead, you attempt to use the get
command with the following dot notation, an error results:
![]() | Using Dot Notation with Properties and Methods | Displaying Properties and Methods | ![]() |