It is currently April 19th, 2024, 7:13 pm

Odd and even numbers

Get help with creating, editing & fixing problems with skins
Wim
Posts: 69
Joined: September 22nd, 2010, 8:30 pm

Odd and even numbers

Post by Wim »

Is there a way to establish whether a week number is an odd number or an even number (and preferably not in Lua)? I intend to make a schedule where on even weeks this happens and on odd weeks that. It's a repeating pattern. I've searched the forum but i haven't found anything relating to it. Any help would be welcome ...
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Odd and even numbers

Post by jsmorley »

Wim wrote: February 10th, 2020, 7:43 pm Is there a way to establish whether a week number is an odd number or an even number (and preferably not in Lua)? I intend to make a schedule where on even weeks this happens and on odd weeks that. It's a repeating pattern. I've searched the forum but i haven't found anything relating to it. Any help would be welcome ...

Code: Select all

[MeasureCalc]
Measure=Calc
Formula=51
IfCondition=MeasureCalc %2 = 0
IfTrueAction=[!Log "[MeasureCalc] is EVEN"]
IfFalseAction=[!Log "[MeasureCalc] is ODD"]
So any EVEN number can be equally divided by 2. No ODD number can.
Wim
Posts: 69
Joined: September 22nd, 2010, 8:30 pm

Re: Odd and even numbers

Post by Wim »

I had that same idea about being divisible in two but couldn't come up with a method to make it work. Thanks a ton! :thumbup: