Comparison for upperbound is not working [message #1808721] |
Sun, 30 June 2019 10:26  |
Eclipse User |
|
|
|
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 13:29  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04132 seconds