[ATL] Is toString() operation not working on Real type? [message #97421] |
Mon, 29 December 2008 22:44 |
FermÃn Messages: 5 Registered: July 2009 |
Junior Member |
|
|
This is a multi-part message in MIME format.
--------------050907040607080408020501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Hi,
After some experiments, I have found that the toString() operation is
not defined for Real types in ATL, thus contradicting the statement in
the ATL User Manual
( http://www.eclipse.org/m2m/atl/doc/ATL_User_Manual%5Bv0.7%5D .pdf),
4.1.4.3: "The toString() operation, available for both the integer and
*real* data types returns a string representing the integer/real value"
I'm attaching a very simple example that can be use to reproduce the
issue, composed of a metamodel with a class using a Real attribute
(Dummy.ecore), a model conforming to it (dummy-sample.ecore) and a very
simple query ATL that just print the attributes (DummyQuery.atl).
When I execute the query I get:
INFO: attReal=OclUndefined
attInteger=12
attString=foo
but I expected to get:
INFO: attReal=3.14
attInteger=12
attString=foo
So, I'm doing something wrong (my experience with ATL is not too long :)
or actually is there a issue with toString() on Real type? In the later
case, is there any workaround, please?
Thanks!
Best regards,
------
Ferm
|
|
|
Re: [ATL] Is toString() operation not working on Real type? [message #97479 is a reply to message #97421] |
Mon, 05 January 2009 08:53 |
William Piers Messages: 301 Registered: July 2009 |
Senior Member |
|
|
Hello,
This is a bug, so I created one here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=259933
Thanks for reporting it.
Best regards,
William
Fermín Galán Márquez a écrit :
> Hi,
>
> After some experiments, I have found that the toString() operation is
> not defined for Real types in ATL, thus contradicting the statement in
> the ATL User Manual
> ( http://www.eclipse.org/m2m/atl/doc/ATL_User_Manual%5Bv0.7%5D .pdf),
> 4.1.4.3: "The toString() operation, available for both the integer and
> *real* data types returns a string representing the integer/real value"
>
> I'm attaching a very simple example that can be use to reproduce the
> issue, composed of a metamodel with a class using a Real attribute
> (Dummy.ecore), a model conforming to it (dummy-sample.ecore) and a very
> simple query ATL that just print the attributes (DummyQuery.atl).
>
> When I execute the query I get:
>
> INFO: attReal=OclUndefined
> attInteger=12
> attString=foo
>
> but I expected to get:
>
> INFO: attReal=3.14
> attInteger=12
> attString=foo
>
> So, I'm doing something wrong (my experience with ATL is not too long :)
> or actually is there a issue with toString() on Real type? In the later
> case, is there any workaround, please?
>
> Thanks!
>
> Best regards,
>
> ------
> Fermín
>
|
|
|
Powered by
FUDForum. Page generated in 0.02830 seconds