|Re: Syntax clarification. [message #792572 is a reply to message #792324]
||Tue, 07 February 2012 06:05
| Ed Willink
Registered: July 2009
You may find slide 47 from
The OCL specification lacks a clear exposition here.
In OCL, you always use "." to navigate from an object and "->" to
navigate from a collection. Everything else is a shorthand.
[To add confusion, various languages influenced by OCL use "." for
collection navigation and eliminate the shorthands.]
On 06/02/2012 22:13, Christian Dietrich wrote:
> welcome to OMG Monster Specs
>> Collections, like Sets, OrderedSets, Bags, and Sequences are
>> predefined types in OCL. They have a large number of
>> predefined operations on them. A property of the collection itself is
>> accessed by using an arrow '->' followed by the name
>> of the property.
>> Shorthand for Collect
>> Because navigation through many objects is very common, there is a
>> shorthand notation for the collect that makes the
>> OCL expressions more readable. Instead of
>> we can also write:
Powered by FUDForum
. Page generated in 0.04104 seconds