I have a situation like this
if (Lag [1]<3 and Lag [2]<3 and Lag [3]<3 and Lag [11]<3 and Lag [12]<3 and Lag [13]<3)
i++; // incrementing
Is there a way to write it better? (Shorter)
This comes up a lot,
Can I just say 'if you and you and you are smaller than 3 then etc" ?
Thanks
It's made more complicated by the fact that your indices are not contiguous.. 1,2,3,11,12,13. That means you can't directly substitute the range in a simple for loop.
If you are only concerned with source code brevity, it doesn't get any shorter than what you've posted.
Can I just say 'if you and you and you are smaller than 3 then etc" ?
That is exactly what you are saying
OK Thanks a lot,
The iteration is not an option this time,
Good enough,
Thanks