Thanks for the response, my problem is not return only a single value but how to have multiple statements inside case?
can you show me how to convert following java into FM :
if (date <= 186) {
switch (date % 31) {
case 0:
month = date / 31;
date = 31;
break;
default:
month = (date / 31) + 1;
date = (date % 31);
break;
}
year = miladiYear - 621;
} else {
date = date - 186;
switch (date % 30) {
case 0:
month = (date / 30) + 6;
date = 30;
break;
default:
month = (date / 30) + 7;
date = (date % 30);
break;
}
I am java developer but I couldn't figure it out how to convert these above lines into FM functions.
One more thing I saw FM has two types of programming, functions and scripts. Seems inside scripts we can have proper if/else and switch case is it so? or do I get it wrong?