Property access
Provides a reference for the syntax used to access properties in OPL.
There are two ways of accessing a property value.
| Syntax | Effect |
|---|---|
| value.name | Returns the value of the Examples: str.length getCar().nameBecause For these properties, use the second syntax. |
| value[name] | Same as the previous syntax, except that this time Examples: str["length"] // Same as str.length getCar()[getPropertyName()] myArray[10] myArray[i+1] |