Structured Type Initialization [message #1077328] |
Thu, 01 August 2013 10:43  |
Eclipse User |
|
|
|
Hello,
In Ocl, is it possible to initialize a local variable that is of a structured type?
If data type A has attributes x and y, I would like to do something like this :
let var : A = {x=1,y=2} in <expression>
Thank you in advance,
Rabab
|
|
|
Re: Structured Type Initialization [message #1077406 is a reply to message #1077328] |
Thu, 01 August 2013 12:52  |
Eclipse User |
|
|
|
Hi
No.
However the Pivot-based OCL prototypes a solution re-using the type
constructor syntax.
let var : A = A{x=1,y=2} in <expression>
Regards
Ed Willink
On 01/08/2013 15:43, Rabab Lembachar wrote:
> Hello,
>
> In Ocl, is it possible to initialize a local variable that is of a
> structured type?
>
> If data type A has attributes x and y, I would like to do something
> like this :
> let var : A = {x=1,y=2} in <expression>
>
> Thank you in advance,
> Rabab
|
|
|
Powered by
FUDForum. Page generated in 0.03322 seconds