|
|
Re: OCL: Iterate over code lines [message #895138 is a reply to message #894913] |
Wed, 11 July 2012 19:24 |
Wouter Schaekers Messages: 17 Registered: July 2012 |
Junior Member |
|
|
Ed Willink wrote on Wed, 11 July 2012 01:34Hi
There is an OCL newsgroup for OCL discussions.
Thanks for pointing this out! I'll post the same question there.
Ed Willink wrote on Wed, 11 July 2012 01:34Your discussion seems to suggest that you are performing run-time
evaluation at compile-time, which is of course possible but a bit
peculiar. For the simple expressions you provide, it may work, but it
will collapse as soon as your expression language elaborates to
incorporate a variable/parameter.
This is just a simplified example of what I actually want to accomplish. What a really want to do is reference checking (just to see whether two objects are the same). That's all, but again with the same possibility to store the result in the first argument. The variable/parameter problem will never occur.
Ed Willink wrote on Wed, 11 July 2012 01:34In OCL you would need to iterate a Set(Tuple(name:String,value:Integer))
to maintain the accumulated state. (Imperative OCL provides a Dict,
which is mutable)
Can you be a bit more specific (eg give an example)? That would help a lot!
Thanks.
[Updated on: Wed, 11 July 2012 19:25] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04617 seconds