It is currently April 19th, 2024, 7:13 pm
Odd and even numbers
-
- Posts: 69
- Joined: September 22nd, 2010, 8:30 pm
Odd and even numbers
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 ...
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Odd and even numbers
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"]
-
- Posts: 69
- Joined: September 22nd, 2010, 8:30 pm
Re: Odd and even numbers
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!