Page 1 of 1

CONTINUE

Posted: Sun Jul 27, 2014 1:42 pm
by wypwong
Hi all

I am a beginner in TM1, and I am looking at the IBM rules guide.
I can't seems to understand this CONTINUE example they use in the guide.

['Jan']= if(!region @= 'Argentina',10,CONTINUE);['Jan']=20;

Why can't they just write it as below:
['Jan']= if(!region @= 'Argentina',10, 20);

Thanks in advance.


Phyllis

Re: CONTINUE

Posted: Sun Jul 27, 2014 1:55 pm
by declanr
wypwong wrote: ['Jan']= if(!region @= 'Argentina',10,CONTINUE);['Jan']=20;

Why can't they just write it as below:
['Jan']= if(!region @= 'Argentina',10, 20);
You can write it either way. CONTINUE is a fairly common concept and can be used to make coding more user friendly but the use of it is largely down to personal preference, normally CONTINUE would be used in slightly more complex examples where there are lots of IFs... but even then you can just nest your IF statements. The example you've shown is very basic and both methods would give the exact same result. As with almost anything in TM1 there are multiple ways to do get the same result.

Re: CONTINUE

Posted: Sun Jul 27, 2014 2:22 pm
by wypwong
Declan

Thanks for the clarification.

It makes a lot more sense now.

P