Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » Comparison for upperbound is not working
Comparison for upperbound is not working [message #1808721] Sun, 30 June 2019 06:26 Go to next message
Eclipse UserFriend
I have the following code

[if a.ownedEnd.getOtherEnd().upperBound().toString() <> '-1']
public [p.type.name/] [p.type.name.toLowerFirst()/]{get;set;}
[else]

In this code the if condition is not working. Can any one please guide me

Thanks
Re: Comparison for upperbound is not working [message #1808730 is a reply to message #1808721] Sun, 30 June 2019 09:29 Go to previous message
Eclipse UserFriend
Hi

Presumably the toString does not return -1. Perhaps it is *. I have no idea why you convert your integer to strings. Maths is normally done with Integers and Reals.

A nice thing about working with M2T is that it is really easy to put in debug printouts. Give it a try and start to learn to debug.

Regards

Ed Willink
Previous Topic:Find Multiplicity of association in acceleo
Next Topic:How can I reuse the template from a super metaclass
Goto Forum:
  


Current Time: Sat Mar 22 22:30:26 EDT 2025

Powered by FUDForum. Page generated in 0.03668 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top