Error in my code but it compiled anyway? if ( 10 < pressDuration < 1000 )

that's interesting -- never seen that during my career but AWOL summary explains it due to precedence