ATL - if expression error [message #874038] |
Sat, 19 May 2012 16:27  |
Eclipse User |
|
|
|
Hi,
I'm trying to use an if expression with more than one action inside it, like:
if(aPerson.gender = #male) {
thisModule.fullName <- 'Mr. ' + aPerson.name + ' ' + aPerson.surname;
}
else {
if(aPerson.isSingle) {
thisModule.fullName <- 'Miss ' + aPerson.name;
thisModule.surname <- aPerson.surname;
}
else {
thisModule.fullName <- 'Mrs. ' + aPerson.name;
thisModule.surname <- aPerson.marriedTo.surname;
}
thisModule.fullName <- thisModule.fullName + ' ' + thisModule.surname;
}
However, when I put " {" after if condition, is being shown the following error:
mismatched input '{' expecting 'then'
How can I use more than one action into if expression?
Thanks
|
|
|
|
|
Powered by
FUDForum. Page generated in 1.03940 seconds